home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / terms / kermit / a / mskerm.mss < prev    next >
Encoding:
Text File  |  1991-09-10  |  316.0 KB  |  6,591 lines

  1. @Part(MSKERMIT,root="kuser")
  2. @comment{Last update: Thu Dec 15 10:04:23 1988}
  3.  
  4. @string(-msversion="@q<2.32/A>")
  5. @string(-msdate="@q<24 Jan 1989>")
  6.  
  7. @Chapter<MS-DOS KERMIT>
  8.  
  9. @case(device,file="@*--------@*
  10. This document is formatted as an ordinary, plain text ASCII disk file, from
  11. SCRIBE text formatter source.  Typeset copies are available from Columbia
  12. University.@*--------@*")
  13.  
  14. @Begin<Description,spread 0.5>
  15. @i(Program:)@\Joe R. Doupnik (Utah State University),
  16. with contributions by James Harvey (Indiana/Purdue University),
  17. James Sturdevant (A.C. Nielsen Company), and many others.  Originally by
  18. Daphne Tzoar and Jeff Damens (Columbia University).  See History.
  19.  
  20. @i(Language:)@\Microsoft Macro Assembler (MASM)
  21.  
  22. @i(Version:)@\@value(-msversion)
  23.  
  24. @i(Released:)@\December 11, 1988.
  25.  
  26. @i(Documentation:)@\Christine Gianone, Frank da Cruz (Columbia University),@*
  27. Joe R. Doupnik (Utah State University)
  28.  
  29. @i(Dedicated To:)@\Peppi
  30. @end<Description>
  31.  
  32. @subheading<Kermit-MS Capabilities At A Glance:>
  33. @begin<description,leftmargin 3.5inches,indent -3.2inches,above 1, below 1,
  34.         spread 0>
  35. Local operation:@\Yes
  36.  
  37. Remote operation:@\Yes
  38.  
  39. Transfers text files:@\Yes
  40.  
  41. Transfers binary files:@\Yes
  42.  
  43. Wildcard send:@\Yes
  44.  
  45. File transfer interruption:@\Yes
  46.  
  47. Filename collision avoidance:@\Yes
  48.  
  49. Can time out:@\Yes
  50.  
  51. 8th-bit prefixing:@\Yes
  52.  
  53. Repeat count compression:@\Yes
  54.  
  55. Alternate block check types:@\Yes
  56.  
  57. Terminal emulation:@\VT102, H19, VT52, Tektronix 4010
  58.  
  59. Communication settings:@\Speed, Parity, Flow Control, Echo
  60.  
  61. Transmit BREAK:@\Yes (and Long BREAK)
  62.  
  63. IBM mainframe communication:@\Yes
  64.  
  65. Transaction logging:@\Yes
  66.  
  67. Session logging (raw download):@\Yes
  68.  
  69. Raw upload:@\Yes
  70.  
  71. Act as server:@\Yes
  72.  
  73. Talk to server:@\Yes
  74.  
  75. Advanced server functions:@\Yes
  76.  
  77. Advanced commands for servers:@\Yes
  78.  
  79. Local file management:@\Yes
  80.  
  81. Command/init files:@\Yes
  82.  
  83. Command macros:@\Yes
  84.  
  85. Extended-length packets:@\Yes
  86.  
  87. Local area networks:@\Yes (NetBIOS and other support)
  88.  
  89. MS-Windows compatibility:@\Yes
  90.  
  91. Attribute packets:@\Yes
  92.  
  93. Sliding windows:@\No
  94. @end<description>
  95.  
  96. @begin<quotation,indent 0>
  97. @bar()
  98.  
  99. @i<IMPORTANT NOTICE:> The user manual for the current release of MS-DOS Kermit
  100. is "Using MS-DOS Kermit", by Christine M@. Gianone, published by Digital
  101. Press, Bedford, MA, 1991, order number EY-H893E-DP, and includes a current
  102. MS-DOS Kermit diskette.  Call 1-800-344-4825 (toll free, USA) to order (VISA,
  103. MC).  This chapter has been retained in the @i<Kermit User Guide> as a
  104. courtesy.  Version 3.0 (and later) of MS-DOS Kermit includes many new
  105. capabilities not described in this chapter.
  106. @bar()
  107. @end<quotation>
  108.  
  109. @Index[PC-DOS]@Index[IBM PC Family]@Index[MS-DOS]
  110.  MS-DOS Kermit, or "Kermit-MS" (or MS-Kermit), is a program that implements the
  111. Kermit file transfer protocol for the entire IBM PC family, including the PS/2
  112. series, IBM compatibles, and several other machines based on the Intel 8086
  113. processor series (8088, 80286, 80386, etc) and the DOS operating system family
  114. (PC-DOS or MS-DOS, henceforth referred to collectively as MS-DOS or simply
  115. DOS).
  116.  
  117. It is assumed you are acquainted with your PC and with DOS, and that you are
  118. familiar with the general ideas of data communication and Kermit file
  119. transfer.  A very brief overview is given here, but for details consult the
  120. early chapters of the @i<Kermit User Guide> (of which this document is a
  121. chapter), or the book @ux<Kermit, A File Transfer Protocol>, by Frank
  122. @w<da Cruz>, Digital Press (1987), order number EY-6705E-DP (phone
  123. 1-800-343-8321), which also includes background tutorials on computers, file
  124. systems, and data communication (including modems, cabling, etc).  For further
  125. information about Kermit documentation, updates, lists of current available
  126. versions, and ordering information, write to:
  127. @begin<format,leftmargin +4,need 5>
  128. Kermit Distribution
  129. Columbia University Center for Computing Activities
  130. 612 West 115th Street
  131. New York, NY  10025  (USA)
  132. @end<format>
  133.  
  134. @Section<System Requirements>
  135.  
  136. Kermit-MS version 2.32/A runs in as little as 100K of memory, but will occupy
  137. up to 160K or so if it can be found for extra screen rollback memory, macro
  138. definitions, etc.  Versions not using screen rollback memory will not require
  139. the additional space.  It will also try to leave 24 Kbytes free for a second
  140. copy of @q<COMMAND.COM> which is needed for execution of certain commands.
  141.  
  142. @index<VT102 Emulation>@index<TopView>@index<Terminal Emulation> On the IBM PC
  143. family, Kermit-MS @value<-msversion> performs almost complete emulation of the
  144. DEC VT-102 and Heath/@|Zenith-19 terminals at speeds up to 19,200 baud or
  145. greater, lacking only the VT102's smooth scrolling and (on most display
  146. boards) 132 column features.  And as of version 2.30, Kermit-MS also performs
  147. Tektronix 4010/4014 graphics terminal emulation on IBM PC family systems
  148. equipped with CGA, EGA, or other graphics adapters, with either color or
  149. monochrome monitors.
  150.  
  151. Much of Kermit's speed is accomplished by direct writes to screen memory, but
  152. this is done in a "TopView-@|aware" manner to allow successful operation in
  153. windowing environments like MS-Windows@index<MS-Windows>, DesqView, and TopView
  154. itself.  Speed is also due to direct access of the serial port 8250
  155. @index<UART> UART (Universal Asynchronous Receiver/@|Transmitter) chip, with
  156. buffered, interrupt-@|driven receipt of characters and selectable XON/XOFF
  157. @Index<XON/XOFF> flow control.  Full speed 9600 baud operation is possible on
  158. 4.77Mhz systems without flow control, but flow control is required on these
  159. systems for 19,200 baud or higher rates.  The IBM PC version should also run on
  160. near-clones like the DG/1@Index<DG/1> that differ from true PCs only in their
  161. choice of UART; non-8250 UARTs are detected automatically, and slower
  162. non-interrupt driven Bios serial port i/o is used, in which case the top speed
  163. is in the 1200 baud range.
  164.  
  165. Kermit-MS @value<-msversion> runs on the entire IBM PC family (the PC, XT, AT,
  166. PCjr, Portable PC, PC Convertible, PS/2) and compatibles (Compaq, VAXmate,
  167. Z150, etc), and there are also specially tailored versions for
  168. non-IBM-@|compatibles like the DEC Rainbow, HP-110, HP-150, HP Portable Plus,
  169. Grid Compass II, Victor 9000, and others, plus a "generic DOS" version that
  170. should run (slowly) on any 8086-based MS-DOS machine.  This document
  171. concentrates on the IBM version; some of the system-@|dependent capabilities
  172. described here may be lacking in the non-IBM versions.  See section
  173. @ref<-msfeatures> for features of different systems.
  174.  
  175. @q<KERMIT.EXE> for the IBM PC family occupies about 102K of disk storage (the
  176. figure will vary for other versions).  This can be reduced by about 15K if you
  177. run it through EXEPACK@index(EXEPACK).  MS-Kermit is not distributed in packed
  178. form, because problems have been reported on certain systems when this is done.
  179. So if you decide to pack it, make sure to keep an unpacked version available
  180. to fall back to in case of problems.
  181.  
  182. @Section<History>
  183.  
  184. Over the years, MS-Kermit has grown from a Kermit file transfer program that
  185. embodied a simple terminal emulator into a complex and powerful communication
  186. program that includes the Kermit file transfer protocol.  As a result, the
  187. bulk of this manual is devoted to the communication features, rather than
  188. Kermit protocol operation.  Skip ahead to the next section if you're not
  189. interested in the history of MS-Kermit.
  190.  
  191. MS-DOS Kermit (like the Kermit file transfer protocol itself) is a product of
  192. the Systems Group of the Columbia University Center for Computing Activities,
  193. and it was one of the four original Kermit programs (with the CP/M, DEC-20, and
  194. IBM mainframe versions).  It was initially written for the IBM PC with DOS 1.1
  195. by Daphne Tzoar in 1981-1982, based largely on Bill Catchings's original CP/M
  196. 8080 assembler version.  PC-Kermit (as it was called then) provided basic
  197. Kermit file transfer and VT52 emulation.  Joellen Windsor of the University of
  198. Arizona added conditional assembly support for the Heath/Zenith-100 shortly
  199. thereafter, and soon after that Dave King of Carnegie-@|Mellon University added
  200. Heath-19 terminal emulation, and some patches to let the program run under the
  201. new DOS version, 2.0.  During this era, the program version numbers went from
  202. 1.0 to 1.20.
  203.  
  204. With the appearance in the marketplace of many new MS-DOS machines that were
  205. not compatible with the IBM PC, it became apparent that conditionally assembled
  206. code supporting each of these machines within a single monolithic source file
  207. was not the best way to organize the program.  Therefore Daphne, along with
  208. Jeff Damens of Columbia, undertook to reorganize the program in a modular way,
  209. isolating system dependencies into separate files.  The result was version
  210. 2.26, released in July 1984.  It included support for the DEC Rainbow, the
  211. HP-150, the Wang PC, and generic MS-DOS, as well as for the IBM PC family and
  212. the H/Z-100.  It also included many new features, like 8th-bit prefixing (code
  213. contributed by The Source Telecomputing), alternate block check selection,
  214. byte-count compression, server/client operation, access to local file and DOS
  215. operations, command macros, initialization and command files, screen rollback,
  216. key redefinition, and more.  For the 2.26 release, the executable Kermit
  217. programs were encoded printably as @qq<.BOO> files, designed by Bill Catchings
  218. as part of this effort, for network and electronic-mail distribution.
  219.  
  220. Release 2.27 was produced by Daphne and Jeff in December 1984.  Unlike 2.26, it
  221. ran correctly on the new PC/AT under DOS 3.0, and included support for the NEC
  222. APC from Ron Blanford of Seattle, WA, and Ian Gibbons of the University of
  223. Hawaii, and for the TI Professional from Joe Smith of the Colorado School of
  224. Mines, plus some bug fixes and reorganization.  2.27 is the last version that
  225. runs under pre-2.0 versions of DOS.
  226.  
  227. Version 2.28 (Daphne, Jeff, June 1985) added dynamic memory allocation to
  228. reduce disk storage for the @q<.EXE> file, and to allow the program to adjust
  229. itself to the PC's memory size, plus the inevitable bug fixes (many of them
  230. contributed by Edgar Butt of the University of Maryland and Gregg Small of the
  231. University of California at Berkeley).  During this period, support for
  232. additional MS-DOS systems was added by various people.
  233.  
  234. In December 1985, a tape showed up at Columbia sent by Prof.@ Joe R.@ Doupnik
  235. of the Center for Atmospheric and Space Studies and EE Department at Utah State
  236. University.  This tape contained version 2.28 modified to fully support the DOS
  237. 2.0 file system, and to which many new features had been added, notably the
  238. ability of the MS-DOS Kermit server to process various REMOTE commands (DIR,
  239. CWD, SPACE, etc).  And at about the same time, a tape arrived from James Harvey
  240. of Indiana/@|Purdue University, who had changed Kermit's CONNECT command to
  241. emulate the popular DEC VT100 terminal.  James's material was sent to Joe, who
  242. then laboriously fitted the VT100 emulation into his own code, keeping the VT52
  243. and H19 emulation alive as options, and upgrading the VT100 emulation to VT102
  244. by adding features such as line and character insertion and deletion.  The
  245. result was version 2.29, released in May 1986.
  246.  
  247. Soon after the release of 2.29, some disks were sent in by James Sturdevant of
  248. the A.C. Nielson Company, containing a full implementation of the Kermit script
  249. facility, as described in the Kermit book.  This material was sent to Joe, who
  250. had by now become keeper of MS-DOS Kermit and had already begun work on version
  251. 2.30 by adding support for extended-@|length packets.  Joe had been carrying on
  252. voluminous network correspondence (Thanks, BITNET!) with Columbia and with
  253. MS-DOS Kermit users and testers all over the world, giving birth to many new
  254. features, including Tektronix graphics terminal emulation, support for
  255. operation over local area networks, support for 8-bit ASCII terminal
  256. connections and international character sets, ANSI printer control, and a
  257. redesigned, more powerful, more portable key redefinition mechanism.
  258.  
  259. Version 2.30 was formally released on January 1, 1988, after many "alpha" and
  260. "beta" tests.  Among the many contributors to this version were Brian Holley
  261. and Joe Smith for the Tektronix emulation, Robert Goeke for the NEC AP3
  262. support, Brian Peterson and Andreas Stumpf for the Victor 9000, Bob Babcock and
  263. Joe White for the Sanyos, Christopher Lent for the Wang PC, Jack Bryans for an
  264. Intel iRMX version, Jim Noble for the Grid Compass, Geoff Mulligan and others
  265. for the Zenith 100, and David Knoell for the special Rainbow edition.  And
  266. thanks to Gisbert Selke, Jack Bryans, and others for proofreading drafts of
  267. this manual, with apologies to anyone we neglected to mention.
  268.  
  269. Work on version 2.31 began within weeks of the release of 2.30.  The major new
  270. features were an improved command interface, a fully capable script
  271. programming language, and inclusion of file attributes packets to send the
  272. time, date and size of files along with the data.  Support for Ungermann-Bass
  273. Net One LAN was also added, thanks to contributions from Henrik Levkowetz and
  274. Renne Rehmann.  These changes led to a fairly thorough revision of the
  275. interior while providing the familiar commands and new features.  Meanwhile,
  276. @index<Japanese>@index<Kana, Kanji>
  277. Horofumi Fujii and Akihiro Shirahasi of the National Laboratory for
  278. High-Energy Physics (KEK) in Japan adapted 2.31 to the NEC PC-9801, and for
  279. this machine added support for Japanese Kana and Kanji character sets.
  280.  
  281. Version 2.32 was issued by Joe in December 1988.  It included the usual bug
  282. fixes, plus several new script programming features, and improved support for
  283. international use, allowing for languages like Hebrew and Arabic that print
  284. right to left, adapted from work by Baruch Cochavy, IIT, Technion, Haifa,
  285. Israel.  Thanks also to Glenn Trewitt, Mark Zinzow, and Ken Ridley for
  286. valuable suggestions and contributions to this release.
  287.  
  288. Like all Kermit programs, MS-DOS Kermit may be freely copied and shared, so
  289. long as it is not done for profit.
  290.  
  291. @Section<Using MS-Kermit>
  292.  
  293. MS-DOS Kermit performs two major functions, terminal emulation and file
  294. transfer.  File transfer can be done using either the Kermit file transfer
  295. protocol, or else (without error checking), ASCII or XON/XOFF capture and
  296. transmission methods.  To use Kermit for "raw" uploading or downloading of
  297. files, see the descriptions of the TRANSMIT and LOG SESSION commands.
  298.  
  299. Before you can transfer files with another system using Kermit protocol, you
  300. must first connect to it as a terminal, login if necessary, and start up a
  301. Kermit program there.  Kermit's CONNECT command lets you do this by making your
  302. PC act like a terminal.  After setting things up on the other computer, you
  303. must return to the PC and tell it what to do.  Returning to the PC is
  304. accomplished by typing a special sequence of characters, called the "escape
  305. sequence."
  306.  
  307. The following example shows this process; the other
  308. computer is a Unix system, but the method is the same with most others.  The
  309. parts you type are underlined (if this document was printed on a printer that
  310. can underline), and when you type a command, you terminate it with a carriage
  311. return, which you can't see in the example.  The mysterious @qq(^]c) is
  312. MS-Kermit's escape sequence, which you enter by holding down the Control
  313. (Ctrl) key and pressing @qq(]) (right square bracket), and then typing the
  314. letter C.  The example assumes the MS-Kermit program is stored on disk as
  315. @q<KERMIT.EXE>.
  316. @begin<example>
  317. @tabclear()@tabset(2.8inches,3.0inches,3.2inches)
  318. @index<Baud Rate>
  319. @i<Program Dialog:>@\@i<Explanation:>
  320.  
  321. A>@ux<kermit>
  322. IBM PC Kermit-MS V@value(-msversion) @value(-msdate)@\@i(Program's greeting.)
  323. Type ? or HELP for help
  324.  
  325. Kermit-MS>@ux<set speed 1200>@\@i(Set the right baud rate).
  326. Kermit-MS>@ux<connect>@\@i(Connect as a terminal.)
  327. @ux<ATDT7654321>@\@i(Dial the modem if necessary.)
  328. CONNECT 1200@\@i(The modem says you're connected.)
  329.  
  330. @ @ @i<Now you're talking to the Unix system.>
  331. @ @ @i<Type a carriage return to get its attention.>
  332.  
  333. Login: @ux<max>@\@i(Login to the host.)
  334. password:@ux<      >@\@i<(Passwords normally don't echo.)>
  335. % @ux<kermit>@\@i(Run Kermit on the host.)
  336. C-Kermit>@ux<receive>@\@i(Tell it to receive a file.)
  337. @ux<^]c>@\@i(Escape back to the PC.)
  338. Kermit-MS>@ux<send autoexec.bat>@\@i(Send a file.)
  339.  
  340. @ @ @i<(The file is transferred...)>
  341.  
  342. Kermit-MS>@\@i(Transfer complete, prompt reappears.)
  343. @end<example>
  344.  In this example, the user types "kermit", and sees the program's herald and
  345. its prompt, @qq(Kermit-MS>).  Then she sets the appropriate communication speed
  346. ("baud rate"), connects as a terminal, issues a dialing command to a Hayes-like
  347. modem@index<Modem> (you would skip this step if you had a direct connection),
  348. logs in to her ID on the Unix system which she has dialed, starts "C-Kermit" on
  349. the Unix system, tells it to receive a file, escapes back to the PC, and tells
  350. MS-Kermit to send a file.  After the file is transferred, the user would
  351. normally connect back to the Unix system, exit from the Kermit program there,
  352. and log out:
  353. @begin<example>
  354. @tabclear()@tabset(2.5inches)
  355. Kermit-MS>@ux<connect>@\@i(Connect again.)
  356. C-Kermit>@ux<exit>
  357. % @ux<^D>@\@i(Logout from Unix by typing Ctrl-D.)
  358. @ux<^]c>@\@i(Escape back to the PC.)
  359. Kermit-MS>@ux<exit>@\@i(Return to DOS.)
  360. @end<example>
  361. To transfer a file in the other direction, simply exchange the "send" and
  362. "receive" commands above.  That's the easiest and quickest way to use Kermit.
  363. If this simple scenario does not work for you, issue the MS-Kermit SHOW
  364. COMMUNICATIONS command and look for any obvious incorrect settings (port,
  365. speed, parity), fix them with SET commands (described in Section @ref<-msset>),
  366. and try again.  (IBM mainframe linemode connections have so many "different"
  367. settings, there's a special command to do them all at once, "do ibm", which you
  368. would type as the first Kermit-MS command above.)  If that doesn't help, read
  369. on.  Many problems can crop up when you attempt to connect two unlike systems
  370. over a possibly hostile communication medium.  And if you intend to be a
  371. frequent user of Kermit, there are many options you can take advantage of to
  372. adapt MS-Kermit to different systems, improve its performance, and automate
  373. common tasks.
  374.  
  375. @Section<The MS-DOS File System>
  376.  
  377. The features of the MS-DOS file system of greatest interest to Kermit users are
  378. the form of the file specifications, and the formats of the files themselves.
  379.  
  380. @subsection<File Specifications>
  381.  
  382. MS-DOS file specifications (in version 2.0 or later of DOS) are of the form
  383. @example(DEVICE:\PATHNAME\NAME.TYPE)
  384. where the DEVICE is a single character identifier (for instance, A for the
  385. first floppy disk, C for the first fixed disk, D for a RAM disk emulator)
  386. followed by a colon (@qq<:>), PATHNAME@index<PATH> is up to 63 characters of
  387. identifier(s) (up to 8 characters each) surrounded by backslashes (@qq<\>),
  388. NAME is an identifier of up to 8 characters, and TYPE is an identifier of up to
  389. 3 characters in length.  Device and pathname may be omitted.  The first
  390. backslash in the pathname may be omitted if the specified path is relative to
  391. the current directory.  In the path field, @qq<.> means the current directory,
  392. @qq<..> means the parent directory.  Some DOS implementations (like Wang) may
  393. use slash (@qq</>) rather than backslash as a directory separator.
  394.  
  395. Pathname is normally omitted, but can be specified in all Kermit-MS commands
  396. (as of version @q<2.29>).  Device and directory pathnames, when omitted,
  397. default to either the user's current disk and directory, or to the current
  398. directory search path as specified in the DOS PATH environment variable,
  399. depending on the context in which the file name appears.
  400. @Begin(Quotation)
  401. When this document says that a file is searched for "in the current
  402. path@index<PATH>," it means that Kermit-MS looks on the current disk and
  403. directory first, and if the file is not found, then the directories listed in
  404. the PATH environment variable are searched.  If the PATH environment variable
  405. is empty, Kermit looks only at the current disk and directory.
  406. @End(Quotation)
  407. @q<NAME.TYPE> is sufficient to specify a file on the current disk and
  408. directory, and only this information is sent along by Kermit-MS with an
  409. outgoing file.
  410.  
  411. The device, path, name, and type fields may contain uppercase letters, digits,
  412. and the special characters @qq<-> (dash), @qq<_> (underscore), @qq<$> (dollar
  413. sign), @qq<&> (ampersand), @qq<#> (number sign), @qq<@@> (at sign), @qq<!>
  414. (exclamation mark), @qq<'> (single quote), @qq<()> (parentheses), @qq<{}>
  415. (curly braces), @qq<^> (caret or circumflex), @qq<~> (tilde), and @qq<`>
  416. (accent grave).  Normally, you should confine your filenames to letters and
  417. digits for maximum transportability to non-DOS systems.  When you type
  418. lowercase letters in filenames, they are converted automatically to uppercase.
  419. There are no imbedded or trailing spaces.  Other characters may not be
  420. included; there is no mechanism for "quoting" otherwise illegal characters in
  421. filenames.  The fields of the file specification are set off from one another
  422. by the punctuation indicated above.
  423.  
  424. The name field is the primary identifier for the file.  The type, also
  425. called the extension or suffix, is an indicator which, by convention, tells
  426. what kind of file we have.  For instance @q<FOO.BAS> is the source of a
  427. BASIC program named FOO; @q<FOO.OBJ> might be the relocatable object module
  428. produced by compiling @q<FOO.BAS>; @q<FOO.EXE> could be an executable
  429. program produced by loading @q<FOO.OBJ>, and so forth.  @q(.EXE) and
  430. @q(.COM) are the normal suffixes for executable programs.
  431.  
  432. @index<Wildcard>
  433. MS-DOS allows a group of files to be specified in a single file specification
  434. by including the special "wildcard" characters, @qq<*> and @qq<?>.  A @qq<*>
  435. matches any string of characters from the current position to the end of the
  436. field, including no characters at all; a @qq<?> matches any single character.
  437. Here are some examples:
  438. @Begin(Description,spread 0.5,leftmargin +10, indent -8)
  439. @q<*.BAS>@\All files of type @q<BAS> (BASIC source files) in the
  440. current directory.
  441.  
  442. @q<FOO.*>@\Files of all types with name @q<FOO>.
  443.  
  444. @q<F*.*>@\All files whose names start with F.
  445.  
  446. @q<*.?>@\All files whose types are exactly one character long, or have no type
  447. at all.
  448. @End(Description)
  449.  
  450. Wildcard notation is used on many computer systems in similar ways, and it is
  451. the mechanism most commonly used to instruct Kermit to send a group of files.
  452.  
  453. Users of Kermit-MS should bear in mind that other (non-@|MS-DOS) systems may
  454. use different wildcard characters.  For instance VMS and the DEC-20 use
  455. @qq(%) instead
  456. of @qq(?) as the single character wildcard; when using Kermit-MS to request a
  457. wildcard file group from a Kermit-20 server, the DOS @qq<?> must be replaced by
  458. the DEC-20 @qq<%>.
  459.  
  460. @subsection<File Formats>
  461.  
  462. MS-DOS systems store files as streams of 8-bit bytes, with no
  463. particular distinction among text, program code, and binary files.
  464. @index<Binary Files>
  465. ASCII text files consist of lines separated by carriage-@|return-@|linefeed
  466. sequences (CRLFs), and this conforms exactly to the way Kermit represents text
  467. files during transmission, so Kermit-MS has no need for a SET FILE TYPE BINARY
  468. command.  But since a non-@|MS-DOS receiving system might need to make
  469. distinctions as to file type, you will probably have to issue SET FILE TYPE
  470. commands there if you are sending it non-text files.  In transmitting files
  471. between Kermit-MS programs, regardless of file contents, the receiving MS-DOS
  472. system is equally capable of processing text, code, and data, and in fact
  473. requires no knowledge of how the bytes in the file are to be used.
  474.  
  475. @index[End Of File]
  476. MS-DOS (unlike CP/M) knows the exact end of a file because it keeps a byte
  477. count in the directory, so one would expect no particular confusion in this
  478. regard.  However, certain MS-DOS programs continue to use the CP/M convention
  479. of terminating a text file with a Control-Z character, and won't operate
  480. correctly unless this terminating byte is present.  Therefore, you should be
  481. aware of a special SET EOF option for both incoming and outbound files,
  482. described later.
  483.  
  484. Non-MS-DOS systems may be confused by nonstandard ASCII files sent by
  485. Kermit-MS:
  486. @begin<itemize>
  487. Files containing any of the 8-bit "extended ASCII" characters may
  488. need conversion (or translation) to 7-bit ASCII.
  489.  
  490. Files produced by word processing programs like Word Perfect or Word Star may
  491. contain special binary formatting codes, and could need conversion to
  492. conventional 7-bit ASCII format prior to transmission, using an "export"
  493. procedure.
  494.  
  495. Files created by word processors that store formatting data at the end of the
  496. file, after the Control-Z and before physical end, may require special
  497. processing via SET EOF to strip the formatting data, lest they confuse
  498. non-@|MS-DOS recipients.
  499.  
  500. Spreadsheet or database files usually need special formatting to be meaningful
  501. to non-@|MS-DOS recipients (though they can be transmitted between MS-DOS
  502. systems with Kermit-MS).  Such programs usually come with an "export" procedure
  503. to convert their files to plain ASCII text.
  504.  
  505. BASIC programs are normally saved in a binary "tokenized" form.  Use BASIC's
  506. @qq<,a> SAVE option to save them as regular ASCII text, as in
  507. @example(save"foofa",a)
  508. @end<itemize>
  509. In general, when attempting to transfer non-text files between MS-DOS and
  510. a different kind of system, consult the Kermit manual for that system.
  511.  
  512. @section<Program Setup and Invocation>
  513. @label<-mspinv>
  514.  
  515. The MS-DOS Kermit program can be run from any disk without any special
  516. installation procedure.  On hard disk systems, it is convenient to store the
  517. program in one of the directories listed in your DOS PATH, and it is often
  518. desirable to customize Kermit's operation to your communications and computing
  519. environment by creating an initialization file.
  520.  
  521. Kermit-MS can be run interactively, from a batch file, as an "external" DOS
  522. command, or from redirected standard input.  Commands consist of one or more
  523. fields, separated by "whitespace" -- one or more spaces or tabs.
  524.  
  525. Upon initial startup, the program executes any commands found in the file
  526. @index(MSKERMIT.INI)@q(MSKERMIT.INI) on the current disk, or (if not found on
  527. the current disk) in the first directory containing a file by that name, from
  528. the list in your DOS PATH environment variable.  The Kermit initialization
  529. file may contain command macro definitions, communications settings for one or
  530. more ports, or any other Kermit-MS commands, and you may create it using any
  531. text editor capable of saving files in plain ASCII text format.  Here is a
  532. sample:
  533. @case<device,file="@begin(example,group,blanklines hinge,leftmargin 0)",
  534.   pagedfile="@begin(example,group,blanklines hinge,leftmargin 0)",
  535.   else="@begin(example,group,blanklines hinge)">
  536. comment -- MSKERMIT.INI, MS-DOS Kermit initialization file
  537.  
  538. comment -- Don't overwrite my files!
  539.  set warning on
  540.  
  541. comment -- Define macros for the systems I use...
  542.  define unix set local-echo off,set par non,set flow xon,set timer off
  543.  def ibm set par odd,set loc on,set hands xon,set flo none,set tim on
  544.  def modem set port 2, set speed 1200
  545.  
  546. comment -- Define macros for quickly adapting to varying
  547.  def noisy  set block-check 3, set receive packet 40, set retry 20
  548.  def normal set block-check 1, set rec pack 94, set retry 5
  549.  def clean  set block-check 2, set rec pack 500, set retry 5
  550.  
  551. comment -- I always start out by connecting to my UNIX system...
  552.  set port 1
  553.  set speed 4800
  554.  do unix
  555.  connect
  556. @end(example)
  557. A different file may be substituted for @q<MSKERMIT.INI> by using
  558. "@q<-f >@i(filename)" on the DOS command line, e.g.
  559. @example(kermit -f monday.ini)
  560.  
  561. The meanings of these commands will emerge below.  For now, just note how
  562. you can use command files (and "macro definitions") to easily adapt MS-Kermit
  563. to widely differing communication environments.  A more advanced initialization
  564. file is shown in section @ref<-msini>.
  565.  
  566. @subheading(Interactive Operation:)
  567.  
  568. To run Kermit-MS interactively, invoke the program from DOS command level by
  569. typing its name, normally "kermit" (this means the program should be stored in
  570. your path@index(PATH) with the name @q<KERMIT.EXE>).  When you see the
  571. program's prompt,
  572. @example(Kermit-MS>)
  573. you may type Kermit commands repeatedly until you are ready to exit the
  574. program, as in the following example (which assumes there's already a Kermit
  575. "server" set up on the other end):
  576. @Begin(Example)
  577. A>
  578. A>@ux[kermit]
  579.  
  580. IBM PC Kermit-MS V@value(-msversion)  @value<-msdate>
  581. Type ? or HELP for help
  582.  
  583. Kermit-MS>@ux[set speed 19200]
  584. Kermit-MS>@ux[send foo.*]
  585.  
  586.   @i(The files are sent.)
  587.  
  588. Kermit-MS>@ux[get fot.*]
  589.  
  590.   @i(The requested files are received.)
  591.  
  592. Kermit-MS>@ux[exit]
  593. A>
  594. @end[example]
  595. Interactive commands are described in Section @ref<-mscmdref>.
  596.  
  597. @subheading(Command Line Invocation:)
  598.  
  599. Kermit-MS may be invoked with command line arguments from DOS command
  600. level, for instance:
  601. @Begin(Example,below 0.5)
  602. A>@ux(kermit send peter.amy)
  603. @End(Example)
  604. or
  605. @Begin(Example,above 0.5)
  606. A>@ux(kermit set port 1, set speed 9600, connect)
  607. @End(Example)
  608.  
  609. In this case, help and completion @index<Completion> are not available (because
  610. the program that provides them won't start running until after you type the
  611. entire command line), and Kermit-MS will exit back to DOS after completing the
  612. specified command or commands.  Therefore, when invoked with command line
  613. arguments, Kermit-MS will behave as if it were an external DOS command, like
  614. MODE.  Note that several commands may be given on the command line, separated
  615. by commas.  This can't be done interactively or from TAKE command files.
  616.  
  617. @index(STAY)
  618. @index(-F Command)
  619. Two special Kermit commands can be given on the DOS command
  620. line.  First is the keyword STAY which prevents Kermit from exiting
  621. naturally when the last command has completed (unless, of course,
  622. EXIT or QUIT was among the commands).  The second command is
  623. @example<-F @i(filename)>
  624. This means use the indicated filename as the initialization file
  625. rather than @q<MSKERMIT.INI>.  The PATH will be searched for this file, if
  626. necessary.  A space or tab must separate -F from the filename, and the F may
  627. be in upper or lower case.  Example:
  628. @example(kermit -f tuesday.ini, set port 2, do ibm, stay)
  629. You can run Kermit with no initialization file at all by using the command
  630. @example(kermit -f nul)
  631. If @q<-F> is the only command line option, STAY is implied.
  632.  
  633. @subheading(Redirected Input and Output)
  634. @index<Redirected input and output>
  635. Kermit-MS also can be operated by redirecting input to it from a file, as in:
  636. @begin<example>
  637. C>@ux(kermit < myscript.txt > myscript.log)
  638. @end<example>
  639. or from a DOS "pipe", as in
  640. @begin<example>
  641. C>@ux(sort < sends.txt | kermit)
  642. @end<example>
  643. The file @q(MYSCRIPT.TXT) contains Kermit commands as if they were typed
  644. manually.  The DOS symbol "@q(<)" means that Kermit should read from the
  645. following file rather from the keyboard.
  646.  
  647. Kermit knows this is occurring and takes special steps to avoid the real
  648. keyboard and to quit when the file has been completely examined.  The filename
  649. can also be the name of a device, such as COM1, to converse on the same or
  650. different line as file transfer traffic.  Information destined for the screen
  651. still goes to the screen unless the phrase "@q(> )@i<filespec>" is added to the
  652. command line above to send the normal screen output to a file or device (device
  653. COM1 also works).  Note that the terminal emulation screen cannot be
  654. redirected.
  655.  
  656. @subheading(Batch Operation:)
  657.  
  658. @index(Batch Operation of Kermit-MS)
  659.  Like many other MS-DOS programs, Kermit-MS may be operated under DOS batch
  660. with command line arguments.  If you invoke it without command line arguments,
  661. it will run interactively, reading commands from the keyboard and not the batch
  662. file.  When it exits, batch processing will continue to the end of the batch
  663. file.
  664.  
  665. Kermit-MS returns the "errorlevel" parameter used as program exit status.
  666. Present values are in the range 0 to 7 with three areas yielding success or
  667. failure reports for the entire Kermit session. The errorlevel values are:
  668. @begin(format)
  669. @tabclear()@tabset(1.6inch)
  670. @u<   errorlevel>@\@ux<Kermit session status>
  671.         0@\entirely successful operation
  672.         1@\a Send command completed unsuccessfully
  673.         2@\a Receive or GET command completed unsuccessfully
  674.         4@\a REMOTE command completed unsuccessfully
  675.      3,5,6,7@\combinations (addition) of the above conditions
  676. @end(format)
  677.  
  678. Note that failures are remembered for the whole session and are not canceled
  679. by a following successful operation of the same type. Thus, sending several
  680. files individually yields an errorlevel of 0 only if all the files were sent
  681. successfully.  The "errorlevel" parameter also applies to script commands
  682. where OUTPUT corresponds to SEND and INPUT to RECEIVE.  An example of Batch
  683. invocation of Kermit is shown in Figure @ref<-mssendbat>.
  684.  
  685. You may also force Kermit to return any desired errorlevel, using the SET
  686. ERRORLEVEL@index<ERRORLEVEL> command.  DOS batch parameters may be passed
  687. along to Kermit; see section @ref<-msmacros> for details.
  688.  
  689. @subheading(Remote Operation:)
  690.  
  691. @index<CTTY> The MS-DOS CTTY command allows an MS-DOS system to be used from a
  692. terminal connected to its communication port.  Such sessions must be conducted
  693. with great care, since many programs assume that they are running on the real
  694. console, and explicitly reference screen memory or the physical keyboard.
  695. Kermit can be used in this manner too, but before you give it any file
  696. transfer commands, you must inform it that it is running in "remote mode"
  697. rather than its normal "local mode."  Use the SET REMOTE ON command for this
  698. purpose, to prevent the file transfer display from being sent out the port.
  699.  
  700. @subheading<RAM Disk Operation:>
  701.  
  702. @index<RAM Disk>
  703. If you invoke Kermit frequently, and you have sufficient memory on your PC,
  704. you may find it convenient to copy Kermit and its initialization file to a RAM
  705. disk when you start your system.  This allows Kermit to be started and used
  706. quickly and silently, with no mechanical disk operations.
  707.  
  708. For instance, if you're using IBM's VDISK
  709. facility to create the RAM disk, you might put statements like this in your
  710. @q<CONFIG.SYS@index(CONFIG.SYS)> file:
  711. @begin<example>
  712. DEVICE=VDISK.SYS 384 512 128 /e
  713. @end<example>
  714. This assumes you have 384K of extended (@q</e>) memory installed and
  715. @q<VDISK.SYS> is in the root directory of the boot disk.  It creates a 384K RAM
  716. disk with 512B sector size and space for 128 directories in the extended
  717. memory, assigning it the disk letter of your first unused disk.
  718. And then in your @q<AUTOEXEC.BAT@index(AUTOEXEC.BAT)> file (assuming the RAM
  719. disk is disk @q<D:>)@q<...>
  720. @begin<example>
  721. COPY KERMIT.EXE   D: >NUL
  722. COPY MSKERMIT.INI D: >NUL
  723. COPY COMMAND.COM  D: >NUL
  724. SET COMSPEC=D:\COMMAND.COM
  725. PATH D:\; ...
  726. @end<example>
  727. The PATH@index(PATH) command allows DOS to find @q<KERMIT.EXE>, and
  728. Kermit to find @q<MSKERMIT.INI> and @q<COMMAND.COM>, on the RAM disk.
  729. If you use Kermit transfer files to your RAM disk, remember to copy those
  730. files to a real disk before you turn off the system.
  731.  
  732. @subheading<Use of MS-Kermit in Windowing and Multiprocessing Environments:>
  733.  
  734. @index<MS-Windows>
  735.  Kermit-MS can operate within windowing environments like such as TopView,
  736. DESqview, and MS-Windows.  It runs in an active window under MS-Windows,
  737. accepts cut and paste material, talks with mice, and shrinks to an icon (a
  738. boxed "KER").  An MS-Windows @index<.PIF Files>@q<.PIF> file can be constructed
  739. for Kermit using the PIFEDIT program, supplied with Windows.  Memory
  740. requirements should be listed as 102 to 160KB.  It should state that Kermit
  741. does not modify the screen, keyboard, memory, COM1, or COM2 (not true but
  742. it satisfies Windows).  Program switch and exchange should be marked as
  743. Text, and Close Window on Exit should be checked.  This configuration will
  744. let you run Kermit with all the Windows features, but slowly.  To run at full
  745. speed under Windows, tell PIFEDIT that Kermit modifies the screen.  Then you
  746. lose the Windows features (cutting, pasting, running the clock at the same
  747. time, etc), but you still get back to the Windows interface when you EXIT
  748. Kermit.
  749.  
  750. MS-Kermit has also been reported to operate successfully under Concurrent
  751. DOS@index<Concurrent DOS>.  However, since it does not interact explicitly
  752. with the Concurrent DOS time-slice scheduler, Kermit will tend use a lot of
  753. CPU cycles.
  754.  
  755. @subheading<Local Area Network Operation:>
  756.  
  757. @Index<Local Area Network>@Index<Network>
  758. @Index<Asynchronous Communication Server>@index<LAN>
  759.  MS-Kermit is capable of using a serial port on another local area network
  760. (LAN) node, so long as that node is running an asynchronous communication
  761. server and you have installed a device driver on your own PC that makes COM1 or
  762. other communication port i/o use the network server.  This type of connection
  763. works because MS-Kermit 2.30 and later releases on IBM PCs check the selected
  764. port to see if it's a real 8250 UART chip, and if it isn't, Kermit uses only
  765. Bios calls for port i/o, and the network routes these through your network
  766. device driver.  It may be desirable to give the command SET PORT BIOS@i<n>
  767. (@i<n> is a digit 1-4) to actively select the Bios port rather than a real
  768. hardware device.  This style of operation should be transparent to Kermit,
  769. but not all asynchronous communications servers utilize this technique.
  770.  
  771. @index<NetBIOS>
  772. @index<Ungermann-Bass>
  773. As of version 2.30, the IBM PC version of Kermit can also communicate directly
  774. with another PC on a local area network through the IBM NetBIOS emulator
  775. distributed with the LAN.  In essence, the LAN substitutes for the serial port,
  776. modem, and other wiring.  Kermit running on one user machine can transfer files
  777. with another Kermit also on the network much as if they were connected by
  778. modems, and Kermit can talk with some larger machines the same way.  The
  779. important network command is
  780. @index<SET PORT NETBIOS>
  781. @index<SET PORT UB-NET1>
  782. @begin(example)
  783. SET PORT NETBIOS @i<nodename>
  784. @end(example)
  785. for NetBios, or
  786. @begin(example)
  787. SET PORT UB-NET1 @i<nodename>
  788. @end(example)
  789. for Ungermann-Bass Net-One NETCI.  For details, see the description of the SET
  790. PORT and SERVER commands, and (if you're interested) Section @ref<-msnetw> for
  791. a technical description.
  792.  
  793. Kermit can even communicate with some other computers, such as Unix systems,
  794. which accept logins via this remote pathway.  The initial startup is the same
  795. as calling a mainframe and logging in except the command SET PORT NET
  796. @i<nodename> is used instead of SET PORT COM1.  A connection is established
  797. with the first use of the communications circuit, such as CONNECT, REMOTE DIR,
  798. SEND, or other file transfer command, and terminated with the HANGUP command.
  799.  
  800. @Section<Kermit-MS Commands>
  801. @label<-mscmdref>
  802.  
  803. MS-DOS Kermit has the following commands:
  804. @blankspace(1)
  805. @Begin(Format,spread 0)
  806. @tabclear()@tabset(1.25inches)
  807. @>@q<->F@\  specify alternate init file name on DOS command line.
  808. @>ASK@\  user to type text, in response to a prompt.
  809. @>ASSIGN@\  the value of one variable to another.
  810. @>BYE@\  to remote server, exit from MS-Kermit.
  811. @>CLEAR@\  serial port buffer.
  812. @>CLOSE@\  log files and stop logging remote session.
  813. @>COMMENT@\  For including comments in command files.
  814. @>CONNECT@\  as terminal to remote system (C).
  815. @>CWD or CD@\  change local working directory.
  816. @>DEFINE@\  a macro of Kermit-MS commands.
  817. @>DELETE@\  local files.
  818. @>DIRECTORY@\  listing of local files.
  819. @>DISABLE@\  server recognition of selected commands.
  820. @>DO@\  a command macro.
  821. @>ECHO@\  a line of text on the screen.
  822. @>ENABLE@\  server recognition of selected commands.
  823. @>EXIT@\  from Kermit-MS.
  824. @>FINISH@\  Shut down a remote Kermit server.
  825. @>GET@\  remote files from server.
  826. @>GOTO@\  jump to labeled line in script file.
  827. @>HANGUP@\  the phone or network connection.
  828. @>HELP@\  about Kermit-MS.
  829. @>IF@\  decision-making in Take or Macro scripts.
  830. @>INPUT@\  specified string from serial port, for scripts.
  831. @>LOG@\  remote terminal session, transactions, or packets.
  832. @>LOGOUT@\  remote server, don't exit from Kermit-MS.
  833. @>MAIL@\  send file to remote Mailer via Kermit.
  834. @>OUTPUT@\  string out serial port, for scripts.
  835. @>PAUSE@\  between commands.
  836. @>POP@\  exit Take file or Macro.
  837. @>PUSH@\  to MS-DOS command level.
  838. @>QUIT@\  from Kermit-MS (same as EXIT).
  839. @>RECEIVE@\  files from remote Kermit (R).
  840. @>REINPUT@\  reread script Input buffer.
  841. @>REMOTE@\  Prefix for remote file management commands.
  842. @>RUN@\  an MS-DOS program or command.
  843. @>SEND@\  files to remote Kermit (S).
  844. @>SERVER@\  mode of remote operation.
  845. @>SET@\  various parameters.
  846. @>SHOW@\  various parameters.
  847. @>SPACE@\  inquiry (about disk space).
  848. @>STATUS@\  inquiry (about settings).
  849. @>STAY@\  stay within Kermit after DOS command line invocation.
  850. @>STOP@\  exit all Take files or Macros.
  851. @>TAKE@\  commands from a file.
  852. @>TRANSMIT@\  a file "raw" (no error checking).
  853. @>TYPE@\  a local file on the screen.
  854. @>VERSION@\  display Kermit-MS program version number.
  855. @>WAIT@\  for the specified modem signal to appear.
  856. @End(format)
  857.  
  858. Not all of these commands are necessarily available on all MS-DOS systems, and
  859. some of the commands may work somewhat differently between DOS versions.
  860.  
  861. A command keyword, such as SEND, RECEIVE, HELP, etc, may be abbreviated, so
  862. long as you have typed enough letters to distinguish it from other keywords
  863. that are valid in that position.  For instance, you can type CLE for CLEAR
  864. and CLO for CLOSE.  Several common commands also have special non-@|unique
  865. abbreviations, like C for CONNECT, S for SEND, and R for RECEIVE. Kermit
  866. will notify you if you have typed a  word with too few letters.
  867.  
  868. @index<Help>
  869. During interactive operation, you may edit the command you're currently typing
  870. using BACKSPACE to erase the character most recently typed, Ctrl-W to delete
  871. the most recent field, or Ctrl-U to delete the entire command.  The editing
  872. characters may be used in any combination until the command is finally entered
  873. by typing RETURN (Carriage Return, Enter) or Ctrl-L.
  874.  
  875. You may use the help (@qq<?>) and keyword completion @index<Completion> (ESC)
  876. features freely while typing Kermit-MS commands.  A question mark typed at
  877. almost any point in a command produces a brief description, or
  878. "menu"@index<Menu>, of what is expected or possible at that point.  ESC typed
  879. at any point, except in a local filename, will cause the current field to be
  880. filled out if what you have typed so far is sufficient to identify it, and will
  881. leave you in position to type the next field (or to type a @qq(?) to find out
  882. what the next field is); otherwise, the program will beep at you and wait for
  883. you to type more characters.
  884.  
  885. As of version 2.31, Kermit-MS recognizes full 8-bit character inputs, with only
  886. NUL, ESC, DEL/BS, Ctrl-W (delete word), Ctrl-U (delete line), and Ctrl-C being
  887. special.  This is to enhance support for various languages and keyboards.  The
  888. SET KEY and SHOW KEY commands can prompt for keyboard input and understand
  889. 8-bit characters but only at their interactive prompt.  The SET KEY, INPUT, and
  890. OUTPUT commands accept "backslash number format" @index<Backslash Number
  891. Format> on the main Kermit command line.  Thus, national characters which are
  892. full 8-bit codes can be expressed on command lines in backslash number form
  893. (\ddd)@index<National Characters>, provided the Kermit command itself can
  894. understand the form.  Most commands that want numbers or single characters as
  895. operands understand this notation.  To enter characters in backslash number
  896. format, type a backslash (@qq<\>) followed by a number corresponding to the
  897. ASCII code for the character.  MS-Kermit accepts many different backslash codes
  898. in different contexts.  These are summarized in Table @ref<-msbacksl>; letters
  899. following the backslach may be either upper or lower case.
  900. @begin<table>
  901. @bar()
  902. @blankspace(1)
  903. @begin<format,leftmargin +2,above 1,below 1,group>
  904. @tabclear()@tabset(0.75inch)
  905. @q<\123>@\(up to 3 decimal digits) - A decimal number
  906. @q<\d123>@\(up to 3 decimal digits) - A decimal number
  907. @q<\o123>@\(up to 3 octal digits) - An octal (base 8) number
  908. @q<\x123>@\(up to 3 hexadecimal digits) - a hexadecimal (base 16) number
  909. @q<\{ }>@\For grouping, e.g. @q<\{12}6 = Ctrl-L 6>, not @q<~>
  910. @q<\;>@\Include a semicolon in a TAKE-file command or macro definition.
  911. @q<\%>@\Introduce a Kermit variable, @q<\%1, \%2, ..., \%a, \%b, ... \%z>
  912. @q<\K>@\A Kermit connect-mode verb like @q<\Kexit> (see Table @ref<-kverbs>)
  913. @q<\B>@\Send a BREAK (OUTPUT command only)
  914. @q<\255>@\Shorthand for CRLF or LFCR (INPUT command only)
  915. @q<\CD>@\Carrier Detect RS-232 signal (WAIT command only)
  916. @q<\DSR>@\Data Set Ready RS-232 signal (WAIT command only)
  917. @q<\CTS>@\Clear to Send RS-232 signal (WAIT command only)
  918. @end<format>
  919. @caption(MS-DOS Kermit Backslash Codes)
  920. @tag(-msbacksl)
  921. @bar()
  922. @end(table)
  923.  
  924. Table @ref(-msascii) shows all of the 7-bit ASCII codes in decimal.  Most
  925. Kermit commands understand backslash-ASCII codes, both imbedded within
  926. character strings, and alone, as when a single character or number is to be
  927. specified.
  928.  
  929. @begin<table>
  930. @bar()
  931. @blankspace(1)
  932. @begin<example>
  933. @u<Dec Name Ctrl            Dec Char      Dec Char     Dec Char>
  934.  
  935.  0   NUL  ^@@           |  32  SP    |   64   @@   |   96  `
  936.  1   SOH  ^A           |  33   !    |   65   A   |   97  a
  937.  2   STX  ^B           |  34   "    |   66   B   |   98  b
  938.  3   ETX  ^C           |  35   #    |   67   C   |   99  c
  939.  4   EOT  ^D           |  36   $    |   68   D   |  100  d
  940.  5   ENQ  ^E           |  37   %    |   69   E   |  101  e
  941.  6   ACK  ^F           |  38   &    |   70   F   |  102  f
  942.  7   BEL  ^G beep      |  39   '    |   71   G   |  103  g
  943.  8   BS   ^H backspace |  40   (    |   72   H   |  104  h
  944.  9   HT   ^I tab       |  41   )    |   73   I   |  105  i
  945. 10   LF   ^J linefeed  |  42   *    |   74   J   |  106  j
  946. 11   VT   ^K           |  43   +    |   75   K   |  107  k
  947. 12   FF   ^L formfeed  |  44   ,    |   76   L   |  108  l
  948. 13   CR   ^M return    |  45   -    |   77   M   |  109  m
  949. 14   SO   ^N shift out |  46   .    |   78   N   |  110  n
  950. 15   SI   ^O shift in  |  47   /    |   79   O   |  111  o
  951. 16   DLE  ^P           |  48   0    |   80   P   |  112  p
  952. 17   DC1  ^Q XON       |  49   1    |   81   Q   |  113  q
  953. 18   DC2  ^R           |  50   2    |   82   R   |  114  r
  954. 19   DC3  ^S XOFF      |  51   3    |   83   S   |  115  s
  955. 20   DC4  ^T           |  52   4    |   84   T   |  116  t
  956. 21   NAK  ^U           |  53   5    |   85   U   |  117  u
  957. 23   ETB  ^W           |  54   6    |   86   V   |  118  v
  958. 22   SYN  ^V           |  55   7    |   87   W   |  119  w
  959. 24   CAN  ^X           |  56   8    |   88   X   |  120  x
  960. 25   EM   ^Y           |  57   9    |   89   Y   |  121  y
  961. 26   SUB  ^Z           |  58   :    |   90   Z   |  122  z
  962. 27   ESC  ^[ escape    |  59   ;    |   91   [   |  123  {
  963. 28   FS   ^\           |  60   <    |   92   \   |  124  |
  964. 29   GS   ^]           |  61   =    |   93   ]   |  125  }
  965. 30   RS   ^^           |  62   >    |   94   ^   |  126  ~
  966. 31   US   ^_           |  63   ?    |   95   _   |  127  RUBOUT,DELETE
  967. @end(example)
  968. @caption<The US ASCII Character Set (ANSI X3.4-1977)>
  969. @index<ASCII>
  970. @tag(-msascii)
  971. @bar()
  972. @end(table)
  973.  
  974. Some Kermit-MS commands like GET, SHOW KEY, and SET KEY, may prompt for
  975. additional information on subsequent lines.  If you have reached one of these
  976. prompts and then wish to cancel the command, you may type Control-C to get
  977. back to the main @q(Kermit-MS>) prompt.
  978.  
  979. @subheading<Summary of Kermit-MS command editing characters:>
  980. @begin(description,leftmargin +12,indent -8)
  981. SPACE@\Separates fields within the command.
  982.  
  983. TAB@\Same as Space, and echoes as Space.  You may also use Ctrl-I for Tab.
  984.  
  985. BACKSPACE@\Deletes the character most recently typed.  May be typed repeatedly
  986. to delete all the way back to the prompt.  You may also use DELETE, RUBOUT,
  987. Ctrl-H, or equivalent keys.
  988.  
  989. Ctrl-W@\Deletes the most recent "word", or field, on the command line.  May be
  990. typed repeatedly.
  991.  
  992. Ctrl-U@\Deletes the entire command line, back to the prompt.
  993.  
  994. Ctrl-C@\Cancels the current command and returns to the "@q(Kermit-MS>)" prompt.
  995. Also, terminates execution of a TAKE command file.
  996.  
  997. ESC@\If enough characters have been supplied in the current keyword
  998. to identify it uniquely the remainder of the field is supplied and the cursor
  999. is positioned to the next field of the command.  Otherwise, a beep is sounded.
  1000. ESC does not provide filename completion.
  1001.  
  1002. @q<?>@\Displays a brief message describing what may be typed in the current
  1003. command field.  Also, wildcard character for matching any single character in
  1004. all but the first position of a filename.
  1005.  
  1006. @q<#>@\Wildcard character for matching single characters in filenames.
  1007. Equivalent to MS-DOS @qq<?>, but used in the first position of a filename
  1008. only, so that @qq<?> may be used to get help at the beginning of a filename
  1009. field.
  1010.  
  1011. ENTER@\Enters the command.  On most keyboards, you may also use RETURN or
  1012. Ctrl-M.
  1013.  
  1014. Ctrl-L@\Clears the screen and enters the command.
  1015. @end(description)
  1016.  
  1017. Liberal use of @qq<?> allows you to feel your way through the commands and
  1018. their fields.  This feature is sometimes called "menu on demand" or "context
  1019. sensitive help" -- unlike systems that force you to negotiate menus at every
  1020. turn, menu-on-demand provides help only when it is needed.
  1021.  
  1022. Command reading is done through DOS calls and Kermit key redefinition does not
  1023. apply at Kermit-MS command level.  But @q<ANSI.SYS> or other external console
  1024. drivers can be used for this purpose@index<ANSI.SYS>, for instance to assign
  1025. ESC to the PC's backquote key (@q<ANSI.SYS> is the IBM-supplied extended screen
  1026. and keyboard device driver, described in the IBM DOS Technical Reference
  1027. Manual).  Other console drivers available include ProKey, SuperKey,
  1028. @q<NANSI.SYS> (a public-@|domain replacement for @q<ANSI.SYS>), and
  1029. FANSICONSOLE.
  1030.  
  1031. The notation used in command descriptions is as follows:
  1032. @begin<description,leftmargin +12,indent -8>
  1033. @q<[>square brackets@q<]>@\An optional field.  This field may be omitted.
  1034.  
  1035. @q<{>curly braces@q<}>@\A list of alternatives, separated by commas.  Choose
  1036. one of the items from the list.
  1037.  
  1038. @i<italics>@\Shows parameters, such as numbers or filenames, are shown in
  1039. italics (providing the printer is capable of printing italics).  You substitute
  1040. the actual number or filename.
  1041.  
  1042. @ux<underlining>@\In dialog examples, the characters you should type are
  1043. underlined (on printers that can show it) to distinguish them from computer
  1044. typeout.
  1045.  
  1046. @q<hh:mm:ss>@\A time of day, in 24-hour notation (10:00:00 is 10 AM; 23:30:00
  1047. is 11:30 PM), which may not be more than 12 hours later than the current time.
  1048. @end<description>
  1049. The following sections describe all the MS-DOS Kermit commands.  Since some
  1050. command descriptions may contain references to other commands that haven't been
  1051. explained yet, you might find that this manual makes more sense on a second
  1052. reading.
  1053.  
  1054. @subsection<Program Management Commands>
  1055.  
  1056. "Program management" is a rubric for Kermit-MS commands like TAKE, EXIT, HELP,
  1057. COMMENT, ECHO, and VERSION, that don't fall into any other category.
  1058.  
  1059. HELP displays a one screen introduction to frequently used Kermit commands and
  1060. their editing keys, and suggests using the question mark command to see the
  1061. terse list of primary level Kermit commands.
  1062.  
  1063. VERSION@index<VERSION> displays the MS-Kermit program version number, which you
  1064. should know in case you are reporting bugs or seeking technical assistance.
  1065.  
  1066. Other program management commands require a bit more explanation.
  1067.  
  1068. @subHeading<The EXIT Command>
  1069. Syntax: @q<EXIT>@ @ @i<or>@ @ @q<QUIT>
  1070.  
  1071. EXIT and QUIT are synonyms for each other.  They cause MS-Kermit to return
  1072. control to DOS or whatever program invoked MS-Kermit.  The specific actions
  1073. taken are:
  1074. @begin<itemize,spread 0>
  1075. Close any open log or other files.
  1076.  
  1077. Close any open network connection.
  1078.  
  1079. Release all memory claimed by the program.
  1080.  
  1081. Return interrupts for the currently selected communication device to their
  1082. original owner.
  1083.  
  1084. Terminate execution.
  1085. @end<itemize>
  1086. @index<Modem>
  1087. The serial port RS-232 signals are left alone upon EXIT, so that modem
  1088. connections are not broken.  Kermit-MS may be restarted with the connection
  1089. intact.  Use HANGUP to explicitly break a modem connection; and use SHOW MODEM
  1090. or SHOW COMMUNICATIONS to view the status of modem signals CD (Carrier Detect),
  1091. Data Set (modem) Ready (DSR), and Clear To Send (CTS).
  1092.  
  1093. @subHeading<The STAY Command>
  1094. @index<STAY Command>
  1095. Syntax: @q<STAY>
  1096.  
  1097. The STAY command, if included among command line arguments, instructs MS-Kermit
  1098. not to exit upon completion but rather to enter interactive mode, unless EXIT
  1099. or QUIT was among the command arguments.  STAY has no effect when entered
  1100. interactively or from a TAKE file.
  1101.  
  1102. @subheading<The PUSH Command>
  1103. @index<PUSH Command>
  1104. Syntax: @q<PUSH>
  1105.  
  1106. PUSH is similar to EXIT, except it leaves MS-Kermit intact by invoking an
  1107. MS-DOS command processor "under" Kermit-MS, either @q(COMMAND.COM) or whatever
  1108. shell you have specified with COMSPEC (or SHELL, depending on the system) in
  1109. your @q<CONFIG.SYS> file.  You can return to Kermit-MS by typing the MS-DOS
  1110. EXIT command, and you will find Kermit-MS as you left it, with all settings and
  1111. the terminal emulation screen intact.  The same function is invoked by the
  1112. CONNECT escape-level command P.  Example:
  1113. @begin<example,group>
  1114. @tabclear()@tabset(2.5inch)
  1115. Kermit-MS>@ux<push>@\@i(Push to DOS.)
  1116. Command v. 3.30@\COMMAND.COM @i<program herald.>
  1117.  
  1118. C>@ux<diskcopy a: b:>@\@i(Run a DOS program.)
  1119.  
  1120. @ @ @i(DISKCOPY dialog here)...
  1121.  
  1122. C>@ux<dir b:>@\@i(More DOS commands)...
  1123.  
  1124. @ @ @i(DOS session continues)...
  1125.  
  1126. C>@ux<exit>@\@i(When done, type DOS EXIT command.)
  1127. Kermit-MS>@\@i(Back at Kermit.)
  1128. @end<example>
  1129.  
  1130. @subHeading<The TAKE Command>
  1131. Syntax: @q<TAKE @i{filespec}>
  1132.  
  1133. The TAKE command gives you way a to collect MS-Kermit commands into a single
  1134. file, so that you can execute many commands by typing a single (TAKE) command.
  1135. TAKE instructs MS-Kermit to execute commands from the file that you specify.
  1136. The current directory is searched for the file first, and then any directories
  1137. listed in the PATH@index(PATH) environment variable.  The command file may
  1138. include any valid Kermit-MS commands, including TAKE, but it cannot include
  1139. characters to be sent to a remote host after a CONNECT command (use scripts for
  1140. that, described below).  Execution of a TAKE file may be cancelled by typing
  1141. Control-C at the keyboard.
  1142.  
  1143. An implicit TAKE command is executed upon the initialization file,
  1144. @index(MSKERMIT.INI)@q<MSKERMIT.INI> (or another file specified in the @qq<-f>
  1145. command-line argument), whenever you start MS-Kermit.  The @q<MSKERMIT.INI>
  1146. file contains any commands you want to be executed each time you run Kermit.  A
  1147. sample is shown above, and a more ambitious example is shown in section
  1148. @ref(-msini).
  1149.  
  1150. Commands within TAKE files, unlike interactive commands, may include trailing
  1151. comments, preceded by semicolons:
  1152. @begin<example>
  1153. set port 2      ; Select the modem port.
  1154. set speed 1200  ; Set the baud rate for the modem.
  1155. connect         ; Conduct a terminal session.
  1156. hangup          ; Hang up the phone after escaping back.
  1157. @end<example>
  1158. Note the HANGUP command after CONNECT.  The HANGUP command is not executed
  1159. until after you escape back from your CONNECT session.  If this file were
  1160. called @q<MODEM.CMD>, the following TAKE command would execute it:
  1161.  @example(Kermit-MS>@ux[take modem.cmd])
  1162.  This directs MS-Kermit to find the @q<MODEM.CMD> file, open it, execute the
  1163. commands in it, close it, and return to the @q(MS-Kermit>) prompt when done.
  1164. This process can take a while on floppy-disk based systems.
  1165.  
  1166. Since TAKE file processing discards all characters from a line beginning with
  1167. the first semicolon, it is normally not possible to include semicolons as part
  1168. of the commands themselves, e.g.
  1169. @begin<example>
  1170. get dska:foo.bar;6
  1171. @end<example>
  1172. To get around this restriction, you may precede such semicolons with a
  1173. backslash:
  1174. @begin<example>
  1175. get dska:foo.bar\;6
  1176. @end<example>
  1177.  
  1178. Commands from the TAKE file will normally not be displayed on your screen
  1179. during execution.  If you want to see them as they are executing, you can SET
  1180. TAKE-ECHO ON (for instance, at the beginning or end of your @q<MSKERMIT.INI>
  1181. file).  With the echoing ON, comments are also displayed for reference,
  1182. but the semicolon is not shown.
  1183.  
  1184. TAKE files may be nested to a reasonable level.  A command file that was
  1185. invoked by another command file normally returns to its invoking command file,
  1186. rather than to the @q(MS-Kermit>) prompt, when the end of the command file is
  1187. reached.
  1188.  
  1189. @index(POP)
  1190. @index(STOP)
  1191. TAKE files have two commands to quit processing before the end of the file is
  1192. reached.  The POP command exits the current TAKE file (or macro) and returns
  1193. control to the previously executing TAKE or macro, where one is invoked within
  1194. another.  The STOP command exits all TAKE files and macros and returns directly
  1195. to the Kermit prompt.
  1196.  
  1197. In TAKE files (and macro definitions, which are discussed later), long commands
  1198. may be continued on subsequent lines by terminating each continued line with a
  1199. hyphen (minus sign).  If a line needs to terminate with a real minus sign it
  1200. may be expressed numerically as @q(\45) or can be extented with extra spaces.
  1201. The overall command length is normally 127 bytes (a beep sounds near this
  1202. limit).
  1203.  
  1204. An explicit question mark (@qq<?>) in a TAKE file will cause a help message to
  1205. be displayed and the rest of the line will be read as another command.  If you
  1206. need to include a question mark in a command, use the ASCII backslash notation
  1207. "@q<\63>".
  1208.  
  1209. @subheading<The -F Command>
  1210. @index<-F Command>
  1211. Syntax: @q<-F @i(filespec)>
  1212.  
  1213. The @qq<-f> command is effective only on the DOS command line.  It instructs
  1214. MS-Kermit to use the specified file as its initialization file, rather than
  1215. @q<MSKERMIT.INI>.  Unlike other command-line arguments, @qq<-f> does not, of
  1216. itself, cause MS-Kermit to exit upon completion.  Example:
  1217. @begin<example>
  1218. C>@ux(kermit -f sunday.ini)
  1219. Kermit-MS>
  1220. @end<example>
  1221. The -F command line option allows different MS-Kermit initialization files to
  1222. coexist.  You can create batch commands to invoke Kermit in different ways,
  1223. for instance @q<MONDAY.BAT> might contain @qq<kermit -f monday.ini>,
  1224. @q<TUESDAY.BAT> @qq<kermit -f tuesday.ini>, etc.
  1225.  
  1226. @subheading<The ECHO Command>
  1227. @index<ECHO Command>
  1228. Syntax: @q<ECHO [@i<string>]>
  1229.  
  1230. The ECHO command writes the string to the screen, without adding a carriage
  1231. return or line feed.  ECHO may be used to report progress during execution of a
  1232. TAKE command file, or to issue prompts during the execution of a script.
  1233. @example<ECHO Part one completed...\13>
  1234. The number at the end is a "backslash codes" for ASCII control characters, in
  1235. this case carriage return (@q<\13>).  Since the ECHO
  1236. command interprets backslash codes, @index<ANSI.SYS>@q<ANSI.SYS> and similar
  1237. console drivers can be programmed through this command by embedding ANSI escape
  1238. sequences (see section @ref<-msescchars>) in the echo string.  The ECHO command
  1239. always outputs a linefeed before the string.
  1240.  
  1241. @subheading<The COMMENT Command>
  1242. @index<COMMENT Command>
  1243. @begin<format>
  1244. Syntax: @q(COMMENT )@i<text>
  1245. @end<format>
  1246.  
  1247. The COMMENT command lets you add comments to a TAKE command file.  The word
  1248. COMMENT (or any unique prefix thereof) must appear as the first word on the
  1249. line.  The COMMENT command may also be entered interactively.  It has no effect
  1250. at all.  Example:
  1251. @begin<example>
  1252. COMMENT - MS-Kermit command file to connect port 2 to an IBM mainframe
  1253. set port 2
  1254. set speed 4800   ; Transmission rate is 4800
  1255. do ibm           ; Set parameters for IBM linemode
  1256. connect          ; Be a terminal
  1257. @end<example>
  1258. Question marks can be included in comments without invoking the help function.
  1259.  
  1260. @Subsection<Local File Management Commands>
  1261.  
  1262. These commands are executed on your local PC, and generally invoke DOS
  1263. services.  This allows you to perform common DOS functions without leaving
  1264. Kermit.  All file specifications may include device and/or directory fields.
  1265. The local file management commands are:
  1266.  
  1267. @begin(description,leftmargin +8,indent -8,group,blanklines hinge)
  1268. @q<CWD >@i(path)@\Changes the current working directory to the given
  1269. path@index(PATH).  All references to local file names without explicit paths
  1270. will refer to that path.  A drive letter may be included to also change disk
  1271. drives.  This command affects Kermit and any inferior programs that you RUN
  1272. or PUSH to, but your previous disk and directory are restored when you exit
  1273. from Kermit.  For consistency with DOS, you may also type CD.
  1274.  
  1275. @q<DELETE >@i(filespec)@\Deletes the specified file or files.  As in DOS, the
  1276. names of the deleted files are not listed, only the message "file(s) deleted"
  1277. or "file(s) not found", and if you give the command "delete @q<*.*>", Kermit-MS
  1278. will prompt "Are you sure?" since DOS is doing the work.
  1279.  
  1280. @q<DIRECTORY >[@i(filespec)]@\Lists the names, sizes, and creation dates of
  1281. files that match the given file specification.  If no filespec is given, the
  1282. command is equivalent to @q(DIR *.*).  Normal DOS switches are effective.
  1283.  
  1284. @q<SPACE>@\Tells how much space is available on the current disk.
  1285.  
  1286. @q<RUN >@i(command)@\Passes the command line to @q<COMMAND.COM> for execution.
  1287. Any legal DOS operation is permitted: running a program (perhaps with command
  1288. line arguments or i/o redirection), executing a DOS command, or executing a
  1289. batch file.  Kermit is suspended while the command is executed and
  1290. automatically resumes afterward.  The command will be executed directly
  1291. by @q<COMMAND.COM> so follow the rules of DOS.  Example:
  1292. @example[Kermit-MS>@ux{run more < xmas.txt}]
  1293.  
  1294. @q<TYPE >@i(filespec)@\Displays the specified local file on the screen.
  1295. Automatic pause is not available at the end of a page (but see above example
  1296. for how to accomplish this).  On most systems, Ctrl-S can be typed to
  1297. stop scrolling and Ctrl-Q to continue scrolling.
  1298. @end(description)
  1299. In most cases when you issue a local command, Kermit attempts to run the
  1300. equivalent DOS command.  If you get a message like "@q<?Unable to execute
  1301. program>", it means that Kermit could not find @q<COMMAND.COM>, or that
  1302. there was not enough memory left to load it.  To ensure that Kermit can 
  1303. find @q<COMMAND.COM>, you should include a PATH statement in your
  1304. @q<AUTOEXEC.BAT> file, which includes the device and directory where
  1305. @q<COMMAND.COM> resides.
  1306.  
  1307. You can add your own local commands by defining macros for them.  For example:
  1308. @begin<example>
  1309. define edit run epsilon \%1
  1310. define more run more < \%1
  1311. define rename run ren \%1 \%2
  1312. @end<example>
  1313. Then you can use these commands at Kermit-MS prompt level: "@q<edit foo.bar>",
  1314. "@q<more oofa.txt>", "@q<rename old.txt new.txt>".  However, you cannot
  1315. redefine built-in commands, for example:
  1316. @example[define send receive \%1]
  1317. See Section @ref<-msmacros> for further information about macros.
  1318.  
  1319. @newpage()
  1320. @subsection(COMMANDS FOR TERMINAL CONNECTION)
  1321.  
  1322. The CONNECT command connects your PC as a terminal to the remote system so that
  1323. you may conduct a session there, and the HANGUP command may be used to
  1324. disconnect your modem (if you have one) from the remote system.  There is
  1325. presently no built-in DIAL command.  Modems may be dialed "manually" during
  1326. CONNECT, or you can construct your own DIAL command by using scripts, which are
  1327. described in detail in subsequent sections.
  1328.  
  1329. For completeness, the descriptions below contain copious reference to the
  1330. SET commands, which let you modify all sorts of terminal and communication
  1331. parameters (the SET commands are described in a later section).  MS-Kermit is
  1332. initially set up with the following parameters, so that you only need to
  1333. issue SET commands for those that need to be changed:
  1334. @begin<description,spread 0,leftmargin +28, indent -24>
  1335. PORT@\1 (in most cases, e.g. COM1 on the IBM PC family)
  1336.  
  1337. TERMINAL@\VT102(*) emulation (IBM PC, DEC Rainbow)
  1338.  
  1339. SPEED@\Whatever the serial card is currently set to.
  1340.  
  1341. PARITY@\None
  1342.  
  1343. FLOW-CONTROL@\XON/XOFF
  1344.  
  1345. HANDSHAKE@\None
  1346.  
  1347. LOCAL-ECHO@\Off
  1348.  
  1349. DISPLAY@\7-bit characters
  1350.  
  1351. INPUT TRANSLATION@\Off
  1352.  
  1353. ESCAPE@\Control-Rightbracket
  1354. @end<description>
  1355. (*) The VT102 terminal is compatible with the VT100, but includes a few
  1356. additional functions.
  1357.  
  1358. @subheading<The CONNECT Command>
  1359. @index<CONNECT Command>
  1360. Syntax: @q<CONNECT @i(-or-)@ C>
  1361.  
  1362. The CONNECT command establishes an interactive terminal connection to the
  1363. remote system using the currently selected communications port (SET PORT COM1
  1364. or COM2, COM1 is the default) with all settings currently in effect for that
  1365. port, emulating the currently selected type of terminal.
  1366.  
  1367. During CONNECT, the characters you type are sent out the communication port,
  1368. and the characters that arrive at the port are displayed on the screen or
  1369. interpreted by the selected terminal emulator.  If you SET LOCAL-ECHO ON,
  1370. MS-Kermit itself will display the characters you type on the screen.
  1371.  
  1372. Before you issue the CONNECT command, be sure to set the correct communication
  1373. speed (SET SPEED) and any other necessary communication parameters (e.g. SET
  1374. PARITY, SET LOCAL-ECHO).  If you have SET DEBUG ON, then (on most DOS systems,
  1375. particularly the IBM PC), received control characters will be displayed in
  1376. special notation and no particular terminal will be emulated.
  1377.  
  1378. By default, 7-bit ASCII characters are displayed on the screen.  If you SET
  1379. DISPLAY 8, then 8-bit characters will be used (useful for "national" character
  1380. sets)@index<National Characters>.  Character translation will be done according
  1381. to any SET TRANSLATION INPUT and SET KEY commands you have issued.  In
  1382. addition, characters that are sent to the screen will also be recorded in a
  1383. disk file or on a printer if you have issued a LOG SESSION
  1384. command@index<Printer>.
  1385.  
  1386. The CONNECT command turns your PC into a terminal to the other computer.
  1387. To get back to the PC, type the escape character followed by the letter C (for
  1388. "Close connection")@index<Escape Character for CONNECT>.  On most MS-DOS
  1389. systems the escape character is Ctrl-@q(]) (Control-@|Rightbracket).  That
  1390. means, hold down the Ctrl key, press @qq<]>, and then type the letter C.
  1391. @begin<example>
  1392. @tabclear()@tabset(2.5inch)
  1393. Kermit-MS>@ux<connect>@\@i<Connect to remote system.>
  1394.  
  1395. @ @ @i<Conduct terminal session here>...
  1396.  
  1397. @ux<^]c>@\@i<Escape back to PC.>
  1398. Kermit-MS>@\@i<Prompt reappears.>
  1399. @end<example>
  1400. This is called "escaping back".  You can use the SET ESCAPE command to change
  1401. the escape character to something besides @qq<^]>, or you can assign the
  1402. escaping-@|back operation to a single key or key combination with SET KEY (on
  1403. the IBM PC the default for this is Alt-X).
  1404.  
  1405. You can include the CONNECT command in a TAKE command file, but not "bare" text
  1406. to be sent to the remote system during CONNECT (use scripts for that, see
  1407. Section @ref<-msscp>).  When a TAKE file includes a CONNECT command, no further
  1408. commands will be executed from the file until after you escape back.  A
  1409. curious side effect of allowing Kermit to accept input redirected from a file
  1410. or device is that Connect mode will read characters from that file or device;
  1411. not really that useful but it works if you happen to need it.
  1412.  
  1413. When you CONNECT, the program attempts to raise the DTR and RTS RS-232 signals
  1414. (see Table @ref<-msrs232c>), and it takes no specific action to lower them
  1415. unless you explicitly issue the HANGUP command; thus you can EXIT from
  1416. Kermit-MS and restart it without dropping a dialup connection.  While
  1417. CONNECTed, you can communicate directly with an autodialer or "smart modem" to
  1418. control the communications line, hang it up, and the like, for instance, by
  1419. typing AT commands to a Hayes-@|like modem.
  1420. @begin<example>
  1421. @tabclear()@tabset(2.5inch)
  1422. @index<Modem>
  1423. Kermit-MS>@ux<set speed 2400>@\@i<(See Section @ref[-msset])>
  1424. Kermit-MS>@ux<connect>
  1425. @ux<AT>@\@i(Now you're talking to the modem.)
  1426. OK@\@i(Your modem responds)
  1427. @ux<ATDT8765432>@\@i(Type the modem's dialing command.)
  1428. RINGING
  1429. CONNECT 2400
  1430. Welcome to ...  @\@i<Now you're talking to the host computer.>
  1431. Please login:
  1432. @end<example>
  1433. MS-Kermit makes no attempt to monitor the modem's Carrier Detect (CD) or Data
  1434. Set Ready (DSR) signals (see Table @ref<-msrs232c>), and will take no notice if
  1435. they drop.  Thus it is not possible to automatically terminate a session if the
  1436. connection is broken.  However, you may query or test the status of these modem
  1437. signals yourself using Kermit's SHOW MODEM, SHOW COMMUNICATIONS, and WAIT
  1438. commands.
  1439.  
  1440. @begin<table>
  1441. @bar()
  1442. @blankspace(1)
  1443. @begin<format,leftmargin +2,above 1,below 1,group>
  1444. @case[device,file="Signal DB25 DB9 Description",
  1445.  pagedfile="Signal DB25 DB9 Description",
  1446.  else="@tabclear()@tabset(0.6inch,1.1inch,1.6inch)
  1447. @ux<Signal>@\@ux<DB25>@\@ux<DB9>@\@ux<Description>"
  1448. ]
  1449. @tabclear()@tabset(0.7inch,1.2inch,1.6inch)
  1450.  FG@\ 1@\-@\Frame (protective) ground
  1451.  TD@\ 2@\3@\Transmitted data (from PC to modem)
  1452.  RD@\ 3@\2@\Received data (by PC from modem)
  1453.  RTS@\ 4@\7@\Request to Send (by PC)
  1454.  CTS@\ 5@\8@\Clear to Send (by modem)
  1455.  DSR@\ 6@\6@\Dataset Ready (Modem is turned on)
  1456.  SG@\ 7@\5@\Signal Ground
  1457.  CD@\ 8@\1@\Carrier Detect (Modem is communicating with remote modem)
  1458.  DTR@\20@\4@\Data Terminal Ready (PC is online)
  1459.  RI@\22@\9@\Ring Indicate (Modem tells PC phone is ringing)
  1460. @end<format>
  1461. @caption(RS-232-C Modem Signals)
  1462. @tag(-msrs232c)
  1463. @bar()
  1464. @end(table)
  1465.  
  1466. @index<Local Echo>
  1467. When using Kermit to connect two PCs "back to back," SET LOCAL-ECHO ON so that
  1468. when you CONNECT to the other PC to send messages to its operator, you can see
  1469. what you are typing.  You should also SET TERMINAL NEWLINE ON, so that that
  1470. a linefeed will be automatically supplied for each carriage return you type.
  1471.  
  1472. @Subheading<The HANGUP Command>
  1473.  
  1474. @index<HANGUP>@index<Modem>
  1475.  On serial port connections, the HANGUP command attempts to momentarily lower
  1476. the modem signals DTR and RTS (Table @ref<-msrs232c>).  It may be used to hang
  1477. up the phone when dialed up through a modem, or to get the attention of port
  1478. contention units or terminal concentrators that operate in this manner.  On
  1479. direct connections, it will probably have no effect.  On local area network
  1480. connections, the network session is fully terminated.  HANGUP affects only the
  1481. currently selected port.
  1482.  
  1483. @subheading(TERMINAL EMULATION)
  1484. @index(Terminal Emulation)
  1485. The IBM PC version of Kermit-MS emulates the DEC VT102 terminal by default, and
  1486. may also be instructed to emulate the DEC VT52, the Heath/Zenith-19, the
  1487. Tektronix 4010 graphics terminal, or no terminal at all, selectable with the
  1488. SET TERMINAL command (or you may "toggle" among the different emulations by
  1489. typing the Alt-Minus key).  Emulation of each of these terminals is nearly
  1490. complete.  VT102 emulation lacks only smooth scroll and 132 column mode (132
  1491. column mode is supported for a number of popular EGA and VGA boards).
  1492. Double-@|height, double-@|width characters are supported, but simulated using
  1493. ordinary characters.
  1494.  
  1495. @index<Blind>
  1496.  The IBM PC's 40-column (large character) screen mode may be used during
  1497. CONNECT (but you may also have to inform the remote host that your screen
  1498. width is 40).  This can provide improved readability to visually impaired
  1499. persons. To use 40-column mode, enter the DOS command "MODE 40" (or CO40
  1500. or BW40).  Other screen sizes are also sensed and used automatically, provided
  1501. you have set them from DOS, before starting Kermit.
  1502.  
  1503. On color monitors, the foreground and background colors may be set
  1504. using SET TERMINAL COLOR, and inverse/normal video display may also be
  1505. selected, along with many other terminal parameters.  A complete list of the
  1506. commands, default key configurations, and escape sequences accepted by the IBM
  1507. PC Kermit terminal emulator is given in section @ref(-termcodes).
  1508. Non-IBM-compatible PCs have different terminal emulation options.  See
  1509. section @ref<-msfeatures>.
  1510.  
  1511. @subheading(Escape-Level Commands)
  1512.  
  1513. @index<Escape Character for CONNECT>
  1514. The escape character, normally Control-@q(]), is used to regain the attention
  1515. of Kermit-MS during CONNECT (you can change the escape character using SET
  1516. ESCAPE).  When you type the escape character, Kermit-MS waits for you to follow
  1517. it with a single character command.  For instance, the single character command
  1518. @qq(?) produces a list of available single character commands.  This command is
  1519. executed immediately; it may not be edited, and the program does not wait for a
  1520. carriage return to confirm it.  Table @ref(-kescapes) shows CONNECT
  1521. escape-level commands available in Kermit-MS.
  1522. @begin<table>
  1523. @bar()
  1524. @blankspace(1)
  1525. @begin<format,leftmargin +2,above 1,below 1,group>
  1526. @Begin(Description,leftmargin +6,indent -4, spread 0)
  1527. @q<?>@\Help -- Lists the available single-@|character commands.
  1528.  
  1529. @q<0>@\(the digit zero) Transmit a NUL (ASCII 0).
  1530.  
  1531. @q<B>@\Transmit a BREAK signal.
  1532.  
  1533. @q<L>@\Transmit a Long BREAK signal (on some systems).
  1534.  
  1535. @q<C>@\Close the connection and return to Kermit-MS prompt level.
  1536.  
  1537. @q<H>@\Hangup the phone by lowering DTR and CTS momentarily.
  1538.  
  1539. @q<F>@\File the current screen in the screen dump file.
  1540.  
  1541. @q<M>@\Toggle the mode line, i.e. turn it off if it is on or vice versa.
  1542.  
  1543. @q<P>@\Push to DOS; get back to CONNECT by typing EXIT.
  1544.  
  1545. @q<Q>@\Temporarily quit logging the remote session.
  1546.  
  1547. @q<R>@\Resume logging the remote session.
  1548.  
  1549. @q<S>@\Show the status of the connection.
  1550.  
  1551. @q<^]>@\(or whatever you have set the escape character to be)@\Typing the
  1552. escape character twice sends one copy of it to the connected host.
  1553. @End(Description)
  1554. @end<format>
  1555. @caption(Kermit-MS Single-Character CONNECT Escape Commands)
  1556. @tag(-kescapes)
  1557. @bar()
  1558. @end(table)
  1559. Typing any other character (except the space bar, which is the "null command")
  1560. after the escape character will cause Kermit-MS to beep, but will do no harm.
  1561. These actions are also Kermit action verbs and can be assigned to single keys.
  1562. See SET KEY for details.
  1563.  
  1564. @subheading(The Mode Line)
  1565.  
  1566. @index[Mode Line]
  1567. When you first issue the CONNECT command, a message (on some systems, an
  1568. inverse video "mode line") will display the most important facts about the
  1569. connection you've just established, so that you can quickly diagnose any
  1570. problems.  Here's what the IBM PC mode line looks like:
  1571. @case[device,
  1572.   postscript="@begin(example,leftmargin 2,above 1,below 1,group)",
  1573.   x9700="@begin(example,leftmargin 4,above 1,below 1,group)",
  1574.   else="@begin(example,leftmargin 0,longlines keep,above 1,below 1,group)"]
  1575. Esc-chr:^] help:^]? port:1 speed:9600 parity:odd echo:rem VT102 .... PRN
  1576. @end(example)
  1577. This shows that the escape character is Ctrl-Rightbracket, that you would type
  1578. Ctrl-rightbracket followed by question mark (@qq<^]?>) to get help during
  1579. CONNECT, that you are connected on port 1 at 9600 baud with odd parity and
  1580. remote echo, and that a VT102 terminal is being emulated.  The four dots
  1581. represent the VT102s LEDs (they turn into the digits 1,2,3,4 when "lit") and
  1582. PRN will show up if the printer@index<Printer> is activated (e.g. by
  1583. Ctrl-PrintScreen).
  1584.  
  1585. The mode line may be turned on and off using SET MODE, or the CONNECT escape
  1586. character followed by the letter M.
  1587.  
  1588. @subheading(Screen Rollback)
  1589. @index<Screen Rollback>@index<Rollback>
  1590.  
  1591.  On the IBM PC and some other systems (see Table @ref(-mstermops)), Kermit-MS
  1592. provides several pages of screen memory which let you recall earlier terminal
  1593. screens.  These may be scrolled up and down using keys as shown in Table
  1594. @ref<-msskeys>.  For instance, the IBM PC uses PgUp (previous screen), PgDn
  1595. (next screen), Ctrl-PgUp and Ctrl-PgDn (one line at a time), Home (top of
  1596. screen memory), and End (bottom of screen memory).  Lines that scroll off the
  1597. top of the screen are saved.  When an application clears the screen using a
  1598. recognized screen-clear sequence @w<(ESC [ 2 J)>, the whole screen is saved.
  1599. The screen scrolling functions may be assigned to different keys with the SET
  1600. KEY command.
  1601.  
  1602. If you have rolled the screen back and a new character must be displayed, it
  1603. will normally appear at the current cursor position on the old screen.  This is
  1604. useful when you are trying to copy something from a previous screen.  If you
  1605. wish new characters to appear in their proper place on the "newest" screen, you
  1606. can SET TERMINAL ROLL ON.
  1607.  
  1608. The number of lines in the roll back buffer depends on the machine, 10 full
  1609. screens for IBM PCs and DEC Rainbows, and on the amount of memory available
  1610. in the machine. Each screen needs 4KB on IBM PCs. Denser displays receive
  1611. fewer roll back lines.
  1612.  
  1613. @subheading(Screen Dump)
  1614. @index<Screen Dump>@index<Dump Screen>
  1615.  
  1616. The screen dump feature writes the contents of the current screen to a file
  1617. (@q<KERMIT.SCN> unless another file was selected by the SET DUMP command) when
  1618. the CONNECT escape-level command F is typed.  The screen dump file is appended
  1619. to on each successive screen dump, with each screen separated by a formfeed
  1620. (Ctrl-L).  This feature may be used in conjunction with screen rollback -- a
  1621. handy way to recapture screenfuls of laboriously typed-in text after a remote
  1622. host has crashed without saving your work.  The corresponding action verb is
  1623. "dump".  Screen dump does not function when in Tektronix graphics mode;
  1624. instead one of many graphics screen capture programs may be used independently
  1625. commonly via the DOS Shift PrtSc key combination or by LOGging the incoming
  1626. byte stream.
  1627.  
  1628. A screen dump differs from a session log in two ways.  First, each desired
  1629. screen must be manually filed, and second, the screen dump file has been
  1630. stripped of any escape sequences, whereas the session log records them
  1631. (see LOG SESSION).
  1632.  
  1633. @subheading(Printer Control)
  1634. @index<Printer>
  1635.  
  1636. During terminal emulation, a locally attached printer may be controlled in the
  1637. normal manner, on most systems.  Pushing the "Print Screen" key (shifted on
  1638. some systems) will cause the current contents of the screen to be printed by
  1639. DOS; holding down Ctrl while depressing Print Screen will alternately start
  1640. and stop the spooling of incoming characters to the printer.  On the IBM PC,
  1641. the mode line will show PRN when the printer is activated in this manner.
  1642. @q(^P) or @q(^N) are sent to the host during terminal emulation and do not
  1643. toggle printing as they do when you're talking directly to DOS.
  1644. CTRL-Print-Screen can be simulated with the Kermit-MS LOG PRN and CLOSE
  1645. commands.  VT102 (ANSI) style host-controlled transparent printing is also
  1646. supported on the IBM PC.  See section @ref<-msprint> for technical information
  1647. about MS-Kermit's printer control.
  1648.  
  1649. Unix users may use the following shell script to print files on a locally
  1650. attached printer:
  1651. @begin<example>
  1652. #!/bin/sh
  1653. # pcprint
  1654. # usage: pcprint file(s)
  1655. #  or <any UNIX process that writes to standard output> | pcprint
  1656. #
  1657. echo -n '<ESC>[5i'
  1658. if [ $# -eq 0 ]; then
  1659.   cat
  1660. else
  1661.   cat $*
  1662. fi
  1663. echo -n '<ESC>[4i'
  1664. @end<example>
  1665. Note that "@q(<ESC>)" above should be replaced by a real Escape,
  1666. ASCII character 27.
  1667. @subheading(Graphics)
  1668.  
  1669. @index<Graphics>
  1670. @index<Tektronix>
  1671. MS-Kermit on the IBM PC, compatibles, and several other systems, is capable of
  1672. emulating a Tektronix 4010 graphics terminal, for use with host-based software
  1673. that can generate Tektronix control codes.  When you enter Tektronix emulation,
  1674. your cursor will disappear.  Don't be alarmed, this is how Tektronix terminals
  1675. behave.
  1676.  
  1677. The Tektronix emulator implements a mixture of Tek 4010 and 4014 features to
  1678. draw characters, lines, and dots in graphics mode.  These Tektronix terminals
  1679. have a graphics display 780 dots high by 1024 dots wide.  They use storage tube
  1680. technology whereby a dot stays illuminated until the full screen is erased.
  1681. They also lack cursor keys.  Kermit's Tek emulator maps the 1024 by 780 dot
  1682. display to the PC's current screen dimensions, say 640 across by 200 or 350
  1683. dots high, and retains limited use of the cursor keys.  It automatically senses
  1684. the active display adapter (EGA, CGA, Hercules, Mono, and AT&T/Olivetti style
  1685. 640x400) and retains screen coloring (EGA) and the current graphics image (EGA
  1686. and Hercules) if the adapter has sufficient memory.  Automatic sensing can be
  1687. manually overriden to select a particular display mode, such as VGA (640x480),
  1688. by SET TERMINAL GRAPHICS <display type>. Pure monochrome systems, of course,
  1689. lack a graphics capability; in this case Kermit approximates the graphic image
  1690. by writing dots as plus signs.
  1691.  
  1692. Tektronix graphics mode is entered two different ways, automatically
  1693. and voluntarily:
  1694. @begin<enumerate>
  1695. Automatically (which you can prevent via the Kermit command DISABLE TEK).
  1696. While emulating a VT102, VT52, or Heath-19, reception of the byte pair ESCAPE
  1697. Control-L causes the PC to change to graphics mode, clear the screen, and obey
  1698. new input as Tektronix commands.  A second automatic entry is reception of the
  1699. escape sequence @w(@qq<ESC [ ? 3 8 h>) which does the same as above except the
  1700. screen is not cleared.  Automatic mode is exited by either reception of
  1701. Control-X or @w(@qq<ESC [ ? 3 8 l>) (lower case L), or by toggling the terminal
  1702. type (ALT minus, Kermit verb@q<\KTermtype>) to VT102, or something other than
  1703. TEK.  (These @w(@qq<ESC [ ? 3 8 h/l>) sequences derive from the DEC VT340
  1704. terminal.)
  1705.  
  1706. Voluntary mode is when terminal type TEK4010 is selected by the Kermit command
  1707. SET TERMINAL TEK4010 or by toggling to it using Alt-Minus.  It is exited by SET
  1708. TERMINAL another-kind or by toggling to another kind.  ENABLE or DISABLE TEK
  1709. and the exit-Tek-mode escape sequences are not applicable to voluntary mode.
  1710. @end<enumerate>
  1711.  
  1712. Here are several common questions about Tek mode, and their answers:
  1713. @begin<enumerate>
  1714. @i<"How do I escape from graphics mode back to being a regular terminal?">
  1715. Within CONNECT mode, you can type the @q<\KTermtype> key, which is assigned by
  1716. default to Alt-Minus.  Repeated pressing of this key "toggles" among Kermit's
  1717. terminal types, VT102, VT52, Heath-19, and Tektronix.  You can also escape
  1718. back to Kermit-MS command level and issue an explicit SET TERMINAL command
  1719. to change the terminal type.
  1720.  
  1721. @i<"How can I return to the graphics screen without erasing it?">
  1722. The graphics screen is preserved if your graphics adapter has sufficient memory
  1723. (see Table @ref<-mstekda>).  In this case, both your text and graphics screens
  1724. will be preserved when you toggle back and forth between a character terminal
  1725. (e.g. VT102) and Tektronix.
  1726.  
  1727. @i<"How do I erase the graphics screen?">  You can type the @q<\KReset> key,
  1728. which is normally assigned to Alt-=.  The screen also clears if the host sends
  1729. a Control-L or ESC Control-L.
  1730.  
  1731. @i<"How do I print or save the graphics screen?">  Kermit does not currently
  1732. provide a way to do this, but you can load drivers like @q<GRAPHICS.COM>
  1733. alongside Kermit for this purpose.
  1734. @end<enumerate>
  1735.  
  1736. While acting as a Tek terminal Kermit uses the keyboard translation
  1737. appropriate to the VT102 terminal.  However, received escape sequences are
  1738. interpreted by the Tek emulator and VT102 escape codes are inoperative.  The
  1739. Tek emulator absorbs the ESCAPE and following character and treats any
  1740. additional unknown items as ordinary text.
  1741.  
  1742. The emulator can display text characters from a built-in 8-by-8 dot font for
  1743. characters Space through DELete (no control codes nor special characters).
  1744. Tabs are converted to single spaces. Only the low 7 bits of the character are
  1745. used.
  1746.  
  1747. While in Tek mode the emulator behaves as a simple TTY device for ordinary
  1748. text and as a line or dot drawing Tektronix device for commands listed in
  1749. Table @ref(-mstekrc).  The screen resolution is governed by the kind of active
  1750. display adapter and monitor in the PC (Table @ref<-mstekda>).  Kermit senses
  1751. this automatically when graphics mode is entered.  Graphics are saved on page
  1752. one of screen memory.  Coloring is determined by the current terminal status,
  1753. either the default screen or that overridden by the command SET TERMINAL
  1754. COLOR.
  1755.  
  1756. @begin<table>
  1757. @bar()
  1758. @blankspace(1)
  1759. @begin<format>
  1760. @tabclear()
  1761. @case[device,file="@tabset(1.6inch,3.0inch,3.75inch)",
  1762.     pagedfile="@tabset(1.6inch,3.0inch,3.75inch)",
  1763.         else="@tabset(1.5inch,3.0inch,3.75inch)"
  1764. ]
  1765. @ux<Display Adapter>@\@ux<Display>@\@ux<Mode>@\@ux<Screen Resolution @~
  1766. and Coloring>
  1767. VGA@\Hi res color@\18@\640x480, graphics saved (407 lines),@*
  1768. @\@\@\ 16 colors.
  1769. VGA@\Monochrome@\17@\640x480, graphics saved (407 lines)
  1770. EGA w/256KB@\Hi res color@\16 dec@\640x350, graphics saved, 16 colors.
  1771. @\Med res color@\14@\640x200, graphics saved, 8 colors.
  1772. @\Monochrome@\15@\640x350, graphics saved, b/w.
  1773. EGA w/64KB@\Hi res color@\16@\640x350, graphics not saved,
  1774. @\@\@\ 4 colors of red, white, blue, black.
  1775. @\Med res color@\14@\640x200, graphics saved, 8 colors.
  1776. @\Monochrome@\15@\640x350, graphics not saved.
  1777. CGA@\Color@\6@\640x200, graphics not saved, b/w.
  1778. Hercules@\Monochrome@\none@\720x348, graphics saved if memory.
  1779. Monochrome@\Monochrome@\7@\80 by 25 text, graphics not saved.
  1780. AT&T/Olivetti@\any@\72@\640x400, grahics not saved, b/w.
  1781. DEC VAXMATE@\any@\208@\640x400, graphics not saved, b/w.
  1782. TOSHIBA T3100@\any@\116@\640x400, graphics not saved, b/w.
  1783. @end<format>
  1784. @caption<Adapters Supported by IBM PC MS-Kermit for Tektronix Emulation>
  1785. @tag(-mstekda)
  1786. @bar()
  1787. @end(table)
  1788.  
  1789. The technical details of Tektronix emulation are presented in section
  1790. @ref<-tekem>.
  1791.  
  1792. @newpage()
  1793. @subsection(COMMANDS FOR FILE TRANSFER)
  1794.  
  1795. MS-Kermit's SEND, GET, and RECEIVE invoke the Kermit file transfer protocol
  1796. for error-@|checked transmission of files between MS-Kermit and another Kermit
  1797. program on the other end of the connection.  There are also commands for "raw"
  1798. transfer of files (no error checking) with systems that don't have Kermit
  1799. programs: LOG SESSION (for capturing text files on your PC) and TRANSMIT (for
  1800. uploading text files to the remote system).  The LOG TRANSACTION command
  1801. opens a file to record the status, time, date, names, sizes of each file
  1802. transfer.
  1803.  
  1804. During file transfer, MS-Kermit normally displays its progress on the screen as
  1805. shown in Figure @ref<-msftscreen>.  The items in the right-hand column are
  1806. updated more or less at random.  The percent done is always filled in when
  1807. sending files, and when receiving if the other Kermit sends the file's size in
  1808. a special file-attribute packet.  The number of retries indicates how many
  1809. times Kermit had to correct transmission errors.  Several other file transfer
  1810. display format options are also available; see SET DISPLAY.
  1811. @begin(figure)
  1812. @bar()
  1813. @blankspace(1)
  1814. @begin<example>
  1815.            Kermit-MS: V@value<-msversion>  @value<-msdate>
  1816.  
  1817.            File name: FOT.
  1818.   KBytes transferred: 7
  1819.  Percent transferred: 52%
  1820.              Sending: In progress
  1821.  
  1822.    Number of packets: 74
  1823.        Packet length: 93
  1824.    Number of retries: 2
  1825.           Last error: None
  1826.         Last warning: None
  1827. @end<example>
  1828. @caption(MS-Kermit File Transfer Display Screen)
  1829. @tag<-msftscreen>
  1830. @bar()
  1831. @end(figure)
  1832.  
  1833. Although MS-Kermit makes no distinction between text and binary
  1834. files@index<Binary Files>, most other Kermit programs do.  Therefore, before
  1835. you attempt to transfer binary files with another type of system (say, a VAX,
  1836. or an IBM mainframe), be sure to give the appropriate command -- usually SET
  1837. FILE TYPE BINARY -- to the Kermit on the remote end.  Kermit-MS itself neither
  1838. has nor needs the command SET FILE TYPE, because the MS-DOS format for text
  1839. files is exactly the same as Kermit's text-file transfer format, which means
  1840. that MS-Kermit never needs to convert file data, no matter whether it be text
  1841. or binary.
  1842.  
  1843. File transfers involving floppy disks will be slow and noisy.  Hard disks are
  1844. much faster (and quieter), and RAM disks faster still (and totally
  1845. silent)@index<RAM Disk>.  But if you store new files on a RAM disk, be sure to
  1846. move them to a real disk before turning off your PC.
  1847.  
  1848. Before attempting to transfer files to the PC, make sure you have enough room
  1849. on the selected device.  Kermit does not provide a way for you to change disks
  1850. during a file transfer.  However, the Kermit protocol will help you out a
  1851. little bit by attempting to prevent transfer of files that are too big to fit
  1852. in the available space.  As of version @q<2.31>, MS-Kermit supports "file
  1853. attributes@index<Attributes>@index<File Attributes>" exchange, and if the other
  1854. Kermit supports this option too, then the receiving program will check free
  1855. disk space before letting the transfer proceed.  MS-Kermit allows a margin of 6
  1856. percent inflation upon reception, because file construction differs markedly
  1857. between systems.  A multiple-file transfer can even skip automatically past
  1858. files that are too big, allowing the little ones to pass though.
  1859.  
  1860. Other attributes exchanged by MS-Kermit include the file's creation date and
  1861. time, and the system of origin.  When two Kermit programs both have attribute
  1862. capability, then files will be stored with the same timestamp on the receiving
  1863. system as they had on the sending system.
  1864.  
  1865. Since exchange of attributes is a new feature to MS-Kermit, and a relatively
  1866. scarce one elsewhere, it is possible that two Kermit programs might
  1867. misunderstand each other because of differing interpretations by the
  1868. programmers, and this could prevent otherwise normal file transfers from taking
  1869. place.  An escape clause is provided by the command SET ATTRIBUTES OFF, which
  1870. makes MS-Kermit forget that it has attribute capability.
  1871.  
  1872. You may record the progress of a file transfer in a log file by issuing the
  1873. command LOG TRANSACTIONS.
  1874.  
  1875. @Subheading<The SEND Command>
  1876. @index<SEND Command>
  1877. Syntax:  @q<SEND> @i{filespec1} [@i(filespec2)]
  1878.  
  1879. The SEND command causes a file or file group to be sent from the local MS-DOS
  1880. system to the Kermit on the remote system.  The remote Kermit may be running
  1881. in server or interactive mode; in the latter case, you should already have
  1882. given it a RECEIVE command and escaped back to your PC.  S is a special
  1883. non-unique abbreviation for SEND.
  1884.  
  1885. @i(filespec1) may contain the @index<Wildcard> wildcard characters @qq<*> to
  1886. match zero or more characters within a field, and/or @qq<#> (first position) or
  1887. @qq<?> (elsewhere) to match any single character (a question mark in first
  1888. position gives you a help message).  If @i{filespec1} contains
  1889. wildcard characters then all matching files will be sent, in the same order
  1890. that MS-DOS would show them in a directory listing.  If @i{filespec1} specifies
  1891. a single file, you may direct Kermit-MS to send that file with a different
  1892. name, given in @i{filespec2}, as in:
  1893.  @example(Kermit-MS>@ux[send foo.bar framus.widget])
  1894. @i(filespec2) begins with the first nonblank character after @i(filespec1) and
  1895. ends with the carriage return; thus it may contain blanks or other unusual
  1896. characters that may be appropriate on the target machine.
  1897. The alphabetic case of text in @i<filespec2> is preserved in transmission, so
  1898. if case matters on the target system, be sure to type @i<filespec2>
  1899. appropriately.
  1900.  
  1901. If the SEND command is specified by itself on the command line, then you will
  1902. be prompted separately for the name of the file to send, and the name to send
  1903. it under:
  1904. @Begin(Example)
  1905. Kermit-MS>@ux(send)
  1906.  Local Source File: @ux(c:\stuff\xcom1.txt)
  1907.  Remote Destination File: @ux(com1.txt)
  1908. @End(Example)
  1909.  
  1910. If a file can't be opened for read access, the message "Unable to find file"
  1911. will be shown or else the standard MS-DOS recovery procedures will take place:
  1912. @Begin(Example)
  1913. Not ready error reading drive A
  1914. Abort, Retry, Ignore?
  1915. @End(Example)
  1916. Kermit remains active even if you select "Abort" (DOS's word, not ours).
  1917.  
  1918. Files will be sent with their MS-DOS filename and filetype (for instance
  1919. @q<FOO.TXT>, no device or pathname).  Special characters in the file name are
  1920. not converted.  If there is no filetype, then only the name will be sent,
  1921. without the terminating dot.  Each file is sent as is, with no conversions done
  1922. on the data, except for possibly stopping at a terminating Control-Z
  1923. character (see the SET EOF command).
  1924.  
  1925. Once you give Kermit-MS the SEND command, the name of each file will be
  1926. displayed on your screen as the transfer begins.  Packet, retry, and other
  1927. counts will be displayed along with informational messages during the transfer,
  1928. in the style specified by SET DISPLAY.  If the file is successfully
  1929. transferred, you will see @qq<Complete>, otherwise there will be an error
  1930. message.  When the specified operation is done, the program will sound a beep.
  1931.  
  1932. @index<Control-X,-Z>@Index<Cancelling a File Transfer>
  1933. Several single-character commands may be given while a file transfer is in
  1934. progress:
  1935. @Begin(Description,leftmargin +6,indent -4)
  1936. @q(^X)@\(Control-X) Stop sending the current file and go on to the next one, if
  1937. any.
  1938.  
  1939. @q(^Z)@\Stop sending this file, and don't send any further files.
  1940.  
  1941. @q(^C)@\Return to Kermit-MS command level immediately without sending any kind
  1942. of notification to the remote system.  (@q<^Z> or even @q<^E> is preferable.)
  1943.  
  1944. @q(^E)@\Like @q(^C), but send an Error packet to the remote Kermit in an
  1945. attempt to bring it back to server or interactive command level.
  1946.  
  1947. @q(CR)@\Simulate a timeout: resend the current packet, or NAK the expected
  1948. one.
  1949.  @End(Description)
  1950.  
  1951.  Control-X, Control-Z, and Control-E send the proper protocol messages to the
  1952. remote Kermit to bring it gracefully to the desired state.  Control-C leaves
  1953. the remote Kermit in whatever state it happens to be in, possibly
  1954. retransmitting its last packet over and over, up to its retry limit.  You
  1955. should only have to use Control-C in dire emergencies (the remote Kermit is
  1956. stuck, the remote system crashed, etc), or at those times when you realize that
  1957. you have given a file transfer command to Kermit-MS without first having told
  1958. the remote Kermit about it.
  1959.  
  1960. MS-Kermit does not have a built-in mechanism for sending an entire directory
  1961. structure, but this may still be done using command files.  A program called
  1962. XSEND@index<XSEND>, distributed along with MS-Kermit, will construct such a
  1963. command file automatically.
  1964.  
  1965. @Subheading<The RECEIVE Command>
  1966. @Index[RECEIVE Command]
  1967. Syntax: @q<RECEIVE [@i{filespec}]>
  1968.  
  1969. The RECEIVE command tells Kermit-MS to receive a file or file group from the
  1970. other system.  The file is stored under the name it was transmitted with,
  1971. except that any illegal characters are translated to X's.  Kermit-MS passively
  1972. waits for the file to arrive; this command is not to be used when talking to a
  1973. Kermit server (use GET for that).  You should already have issued a SEND
  1974. command to the remote Kermit and escaped back to Kermit-MS before issuing the
  1975. RECEIVE command.  The RECEIVE command is intended for situations where the file
  1976. name and sending operation originates at the other side; GET originates the
  1977. request from our side and asks the server to perform the operation.  R is a
  1978. special non-unique abbreviation for RECEIVE.
  1979.  
  1980. If the optional filespec is provided, incoming files will be stored
  1981. under that name.  If the filespec is really just a path@index(PATH) then files
  1982. are stored where the path indicates.  If it is an actual filename the first
  1983. incoming file is renamed and any additional files either overwrite the first
  1984. (if FILE WARNING is OFF) or are renamed slightly from the filespec (digits are
  1985. added to the end of the main filename part before the dot and extension) if
  1986. FILE WARNING is ON (the default). The filespec may include any combination of
  1987. the following fields:
  1988. @begin<description,leftmargin +6,indent -4>
  1989. @i<Device designator>@\Store the file on the designated device, in the current
  1990. directory for that device.  If no device designator is given, store it on the
  1991. current default device.
  1992.  
  1993. @i<Directory path>@\Store the file in the designated directory on the current
  1994. disk.  If no path given, store the file in the current directory.
  1995.  
  1996. @i<File name>@\Store the file under the name given.  If no name is given, store
  1997. it under the name it was sent under, converted, if necessary, to suit DOS
  1998. conventions, and modified, if SET WARNING ON, to avoid overwriting any file of
  1999. the same name in the same directory.
  2000. @end<description>
  2001.  
  2002. @Index<Incomplete File Disposition>
  2003. If an incoming file does not arrive in its entirety, Kermit-MS will normally
  2004. discard it and it will not appear in your directory.  You may change this
  2005. behavior by using the command SET INCOMPLETE KEEP, which will cause as much of
  2006. the file as arrived to be saved on the disk.
  2007.  
  2008. @index<Control-X,-Z>@Index<Cancelling a File Transfer>
  2009. The same single-character commands are available as during SEND:
  2010. @Begin(Description,leftmargin +6,indent -4)
  2011. @q(^X)@\Request that the remote Kermit stop sending the current file, and
  2012. proceed to the next one immediately.  Since this is an optional feature of the
  2013. Kermit protocol, the remote Kermit might not honor the request.
  2014.  
  2015. @q(^Z)@\Request that the remote Kermit terminate the entire transfer; this is
  2016. also an optional feature that may or may not be supported by the remote Kermit.
  2017.  
  2018. @q(^C), @q(^E), and @q(CR) operate in the same way as they do during SEND.
  2019. In this case, @q(^E) should always do what @q(^Z) is supposed to do.
  2020. @End(Description)
  2021. If WARNING is OFF and you type @q(^X) or @q(^Z) to interrupt the transfer,
  2022. you'll either get a partial new file, or else both the old and the new file of
  2023. that name will be lost, depending on SET INCOMPLETE.  In any case, when WARNING
  2024. is off, old files with the same name as incoming files will not survive.
  2025.  
  2026. @i(Caution:) If an incoming file's name (the part before the dot) corresponds
  2027. to an MS-DOS device name, such as NUL, COM1, CON, AUX, or PRN, output will go
  2028. to that device, rather than to a file with that name.  This is a feature of
  2029. MS-DOS.
  2030.  
  2031. @subsection(Hints for Transferring Large Files)
  2032.  
  2033. During a prolonged file transfer session, things can go wrong that are
  2034. beyond Kermit's control.  The longer the session, the greater the probability
  2035. it will be fatally interrupted.  But you can take a few precautions:
  2036. @begin<itemize>
  2037. Make sure there is sufficient disk space at the receiving end.  If possible,
  2038. first run a disk utility (such as CHKDSK) to clean out any bad disk blocks.
  2039.  
  2040. If you are using a telephone connection, make sure your session won't be
  2041. interrupted by call waiting, people picking up other extensions, etc.
  2042.  
  2043. Don't attempt to transfer a single file of many megabytes over a telephone
  2044. connection.  The longer the call, the greater the chance of disconnection
  2045. (carrier loss).  Although it's a bother, it may save time in the long run to
  2046. break the file up into smaller pieces, transfer the pieces, and then recombine
  2047. on the other end.
  2048.  
  2049. SET INCOMPLETE KEEP on the receiving end, so that if the transfer fails,
  2050. then the partial file will be retained.  Then chop the part that wasn't
  2051. transferred into a separate file, reconnect, and send it.  Then join the
  2052. pieces together.
  2053. @end<itemize>
  2054. Consider moving truly massive amounts of data on magnetic media.
  2055. "Never understimate the bandwidth of a station wagon full of magnetic tapes!"
  2056. (or diskettes).
  2057.  
  2058. @subsection(Commands for Raw Uploading and Downloading)
  2059.  
  2060. MS-Kermit can be used to send files to, or capture files from, remote systems
  2061. that do not have Kermit programs available.  No error checking or correction
  2062. is done, so the results can very likely contain corrupted characters, spurts
  2063. of noise, gaps, or extraneous system messages or prompts.  The command for
  2064. uploading is TRANSMIT, and for downloading LOG SESSION.
  2065.  
  2066. To minimize loss of data during these operations, be sure to SET the
  2067. FLOW-CONTROL@index<XON/XOFF> and HANDSHAKE parameters to match the
  2068. characteristics of the system on the other end.
  2069.  
  2070. @subheading<The TRANSMIT Command>
  2071. @index<TRANSMIT>
  2072. Syntax: @q(TRANSMIT @i<filespec> [@i<prompt-character>])
  2073.  
  2074. The TRANSMIT command provides a basic raw upload (export) facility to send
  2075. straight ASCII text files to the host without packets, error checking, or
  2076. retransmissions, but using all the currently selected communication parameters
  2077. for flow control, parity, etc.  Information is read from the disk file a line
  2078. at a time, sent out the serial port, and the command waits for a single
  2079. character prompt (normally linefeed) from the host before sending the next file
  2080. line.  A disk file line ends with carriage-@|return-@|linefeed (CRLF), but only
  2081. the carriage return is sent, just as you only type carriage return at the end
  2082. of a line, not CR and LF.  Most remote systems will echo the CR and then also
  2083. supply a LF, which indicates that they have processed the line and are ready
  2084. for another one.  Setting the prompt to binary zero, @q<\0>, makes the TRANSMIT
  2085. command proceed without waiting for a prompt.  Pressing the local Return key
  2086. simulates arrival of a prompt character.
  2087.  
  2088. Typically, before using this command to upload a file, you would start a text
  2089. editor (preferably a line-oriented, rather than full-screen, editor) on the
  2090. remote host and put it into text insertion mode.  When the file has been
  2091. completely transmitted, you would manually enter the required sequence for
  2092. getting the editor out of text insertion mode, and then make any necessary
  2093. corrections by hand.  Here's an example for VAX/VMS:
  2094. @begin<example>
  2095. @tabclear()@tabset(2.75inches)
  2096. Kermit-MS>@ux<set flow xon/xoff>@\@i<Set flow control to match VAX/VMS.>
  2097. Kermit-MS>@ux<connect>@\@i<Connect to VAX.>
  2098. $ @ux<edt foo.txt>@\@i<Start the EDT editor.>
  2099. *@ux<i>@\@i<Put it into "insert" mode.>
  2100. @ux<^]c>@\@i<Escape back to Kermit-MS.>
  2101. Kermit-MS>@ux<transmit foo.txt>@\@i<Upload the file a line at a time.>
  2102.  ...@\@i<Each line is displayed on the screen.>
  2103. Kermit-MS>@ux<connect>@\@i<When done, connect back to the VAX.>
  2104. @ux<^Z>@\@i<Type Ctrl-Z to exit EDT insert mode.>
  2105. *@ux<exit>@\@i<Exit from EDT to save the file.>
  2106. $
  2107. @end<example>
  2108.  
  2109. If transmission appears to be stuck, you can wake it up by typing a carriage
  2110. return on the keyboard.  You can cancel the TRANSMIT command by typing a
  2111. Control-C.  Control-Z's or other control characters in the file may have
  2112. adverse effects on the host.  For this reason, you should use TRANSMIT only for
  2113. files that contain 7-bit printing ASCII characters, spaces, tabs, carriage
  2114. returns, linefeeds, and possibly formfeeds.
  2115.  
  2116. @subheading(The LOG SESSION Command)
  2117. @index(LOG SESSION)
  2118. Syntax: @q(LOG SESSION )[@i<filespec>]
  2119.  
  2120. The LOG SESSION command lets you copy the characters that appear on your screen
  2121. during CONNECT into the specified file on the PC.  You can use this command to
  2122. download files by displaying (usually with a command like TYPE) the file on the
  2123. remote system while logging is in effect.  Example:
  2124. @begin(example)
  2125. @tabclear()@tabset(2.75inch)
  2126. Kermit-MS>@ux<set flow xon/xoff>@\@i<Set flow control to match VAX/VMS.>
  2127. Kermit-MS>@ux(connect)@\@i<Connect to the VAX.>
  2128. $ @ux(type foo.bar)@\@i(Type this command without a CR.)
  2129. @ux(^]c)@\@i(Escape back.)
  2130. Kermit-MS>@ux(log session foo.bar)@\@i(Start logging.)
  2131. Kermit-MS>@ux(connect)@\@i(Connect back.)
  2132. @\@i(Now type the carriage return.)
  2133. This is the file FOO.BAR.@\@i(The file is displayed on your screen)
  2134. Blah blah ...@\@i(and captured into PC file) FOO.BAR.
  2135. $ @\@i(The prompt is captured too.)
  2136. @ux(^]c)@\@i(When done, escape back)
  2137. Kermit-MS>@ux(close session)@\@i(and close the log file.)
  2138. @end(example)
  2139. The PC file @q(FOO.BAR) now contains a (possibly mutilated) copy of the remote
  2140. computer's @q(FOO.BAR) file.  It probably has the remote system's prompt at the
  2141. end, which you can edit out.  The session log can also be used to record
  2142. typescripts, editing sessions, Tektronix graphics output, or any other output
  2143. from, or dialog with, the remote computer.
  2144.  
  2145. During terminal emulation, the LOG command records all the characters that
  2146. arrive from the remote host in the specified file, including escape sequences,
  2147. with any input character translations applied according to SET TRANSLATION
  2148. INPUT.  If you have SET LOCAL-ECHO ON, the characters you type will also be
  2149. recorded.  Logging may be suspended and resumed within a terminal session with
  2150. the CONNECT escape-@|level commands Q and R.  The log file will be composed of
  2151. 7-bit ASCII bytes if (a) PARITY@index<Parity> is other than NONE, or (b)
  2152. DISPLAY is SET to 7.  If DISPLAY is 8 and PARITY is NONE, or if DEBUG is ON,
  2153. then the log will contain 8-bit bytes.
  2154.  
  2155. You may LOG SESSION PRN to cause the logging information to be printed directly
  2156. on your printer@index<Printer>.  Any escape sequences that are sent to the
  2157. screen are also sent to the printer.
  2158.  
  2159. If you want to record information without imbedded escape sequences, use the
  2160. screen dump feature, invoked by the CONNECT escape-@|level command F, which is
  2161. described under the CONNECT command.
  2162.  
  2163. A session log cannot be played back directly on the PC from the log file.
  2164. To relive the session, you must transfer it to the remote system and display
  2165. it in "binary mode" (e.g. cat in Unix) while CONNECTed.
  2166.  
  2167. @subsection(Kermit Server Commands)
  2168.  
  2169. Kermit-MS can act as a Kermit server, and can also interact with other Kermit
  2170. servers.  Normally, the remote Kermit is put into server mode.  Then the local
  2171. Kermit becomes a "client", and may issue repeated commands to the server
  2172. without having to connect and escape back repeatedly.  Servers can not only
  2173. transfer files, but can also provide a variety of file management functions.
  2174. The SERVER command puts MS-Kermit into server mode, and the DISABLE and ENABLE
  2175. commands modify the behavior of the server.
  2176.  
  2177. Kermit servers respond only to information sent as Kermit protocol packets and
  2178. not to ordinary CONNECT-mode commands.  When MS-Kermit is the client, it uses
  2179. the SEND command (described above) to send files to a server, the GET command
  2180. (@i(not) RECEIVE) to get files from a server, the REMOTE commands to invoke the
  2181. file management functions of the server, and the BYE, FINISH, or LOGOUT
  2182. commands to shut down the server.  The MS-Kermit server can also be returned
  2183. to interactive mode by typing Ctrl-C or Ctrl-Break on the PC's console
  2184. keyboard; if the SERVER command was issued from a command file, execution of
  2185. the command file will resume with the next command after SERVER.
  2186.  
  2187. @subheading<The SERVER Command>
  2188. @index<Server>
  2189. Syntax: SERVER [timeout]
  2190.  
  2191. Kermit-MS is capable of acting as a full-fledged Kermit server for users coming
  2192. in through one of the communication ports or a local area network.  To put
  2193. Kermit-MS into server mode, first issue any desired SET commands to select and
  2194. configure the desired port, then DISABLE any undesired functions, and then type
  2195. the SERVER command.  Kermit-MS will await all further instructions from the
  2196. client Kermit on the other end of the connection, which may be hardwired, or
  2197. connected through a network or autoanswer modem.
  2198.  
  2199. In the following example, a Kermit server is set up for dialing in:
  2200. @Begin(Example)
  2201. Kermit-MS>@ux(set port 1)
  2202. Kermit-MS>@ux(set speed 1200)
  2203. Kermit-MS>@ux<hangup>
  2204. Kermit-MS>@ux(connect)
  2205. @ux<ATS0=1>
  2206. OK
  2207. @ux<^]c>
  2208. Kermit-MS>@ux(set server timeout 0)
  2209. Kermit-MS>@ux(set warning on)
  2210. Kermit-MS>@ux(disable all)
  2211. Kermit-MS>@ux(server)
  2212. @End(Example)
  2213. Before putting Kermit in server mode in this case it was necessary to
  2214. connect to the modem (in this example, a Hayes) and put it into autoanswer
  2215. mode by typing the ATS0=1 command@index<Autoanswer Modem>. Since Kermit
  2216. packets typically start with a Control-A character check the modem's manual
  2217. to ensure that character is not a modem command signal; some brands regard
  2218. Control-A as a hangup request!
  2219.  
  2220. Note the command SET SERVER TIMEOUT 0.  This disables the MS-Kermit server's
  2221. normal behavior of timing out periodically and sending a NAK packet while
  2222. waiting for a connection.  This might be necessary with certain modems or PBXs
  2223. that can be taken out of answer mode if they receive any characters from the
  2224. PC before a call is received.
  2225.  
  2226. An optional timeout value can be specified to exit server mode automatically at
  2227. a certain time.  The timeout can be expressed as a number, meaning seconds from
  2228. now, or as the @q<hh:mm:ss> form, in 24-hour time of day.  Both forms recognize
  2229. times greater than 12 hours from now as being in the past.  For instance, if
  2230. you want to run a Kermit server for an hour, and then have it exit so that
  2231. another program can run, use a command file like:
  2232. @begin<example>
  2233. set port 1        ; Use COM1
  2234. set speed 2400    ; at 2400 bps.
  2235. disable all       ; Only allow file transfers in current directory.
  2236. server 3600       ; Be a server for 3600 seconds = 1 hour.
  2237. exit              ; Exit when done.
  2238. @end<example>
  2239.  
  2240. @begin<text,need 7,above 1>
  2241. MS-Kermit @value<-msversion> server mode supports the following requests:
  2242. @end<text>
  2243. @begin<example,facecode R>
  2244. @tabclear()@tabset(1.5inches,3.5inches,5.5inches)
  2245. SEND  @\REMOTE CWD (CD) @\REMOTE MESSAGE
  2246. GET   @\REMOTE DELETE   @\REMOTE SEND
  2247. FINISH@\REMOTE DIRECTORY@\REMOTE SPACE
  2248. BYE   @\REMOTE HELP     @\REMOTE TYPE
  2249. LOGOUT@\REMOTE HOST     @\REMOTE WHO
  2250. @\REMOTE LOGIN
  2251. @end<example>
  2252.  
  2253. REMOTE CWD (CD) can be used to change both directories and devices.  The REMOTE
  2254. MESSAGE command accepts a one line message on the command line which will be
  2255. displayed on the operator's console.  An MS-Kermit Server can DISABLE
  2256. recognition of selected REMOTE commands to help reduce accidents.
  2257.  
  2258. @begin<Quotation>
  2259. @i<CAUTION:> The method used for most of the REMOTE commands is to invoke a
  2260. task with the user's command line, redirect standard output to a temporary
  2261. file, @q<$KERMIT$.TMP>, send that file back to the remote end, and then delete
  2262. the file.  Sufficient space must be available to store this file.  To service
  2263. DOS commands or user tasks @q<COMMAND.COM> must be located on the DOS PATH.
  2264.  
  2265. @i<FURTHER CAUTION:> Any of these DOS tasks or programs may encounter an error,
  2266. and in that case, DOS will generally put the familiar "Abort, Retry, Ignore?"
  2267. message on the server's screen, and will wait for an answer from the keyboard.
  2268. This will hang the server until a human comes to the keyboard and gives a
  2269. response.  The same thing will happen when any program is invoked that
  2270. interacts with the real console.  DISABLE ALL seems to avoid most unpleasant
  2271. situations of this kind.
  2272. @end<quotation>
  2273.  @index<Local Area Network>
  2274.  For local network operation with NetBios, the SET PORT NET command (with no
  2275. node name) must be issued before the SERVER command.  MS-Kermit then becomes a
  2276. network-wide server, and other client Kermits can start a network session with
  2277. it by using the name of the Kermit Server, which is shown on the server's
  2278. screen when SET PORT NET is given.  The Kermit Server accepts connections from
  2279. other Kermits, but only one at a time. There may be many Kermit Servers active
  2280. on the network simultaneously because each has a unique node name.  Operations
  2281. are exactly the same as with serial port usage and the session (equivalent to
  2282. a dialed phone connection) is maintained between the pair until too many
  2283. timeouts occur, or the client Kermit issues a HANGUP command, exits to DOS, or
  2284. SETs PORT NET to another node.  In the latter cases, the server remains
  2285. available for use by other client Kermits.  If a client Kermit issues the BYE
  2286. or FINISH command, the network server is shut down (unless it was started with
  2287. FIN disabled).
  2288.  
  2289. @Subheading<The DISABLE and ENABLE Commands>
  2290. @index<Network security>@index<Security>
  2291.  
  2292. For security purposes, it may be desirable to leave your PC in Kermit server
  2293. mode so that it can be dialed in to, but with certain functions unavailable to
  2294. those who dial in.  The DISABLE and ENABLE commands provide this control.
  2295.  
  2296. The DISABLE and ENABLE commands affect the following functions, with the
  2297. effect of DISABLEs noted:
  2298. @begin<description,spread 0,leftmargin +12,indent -8>
  2299. CWD@\(CD) Changing of directories, disabled entirely.
  2300.  
  2301. DEL@\Deletion of files confined to current directory.
  2302.  
  2303. DIR@\Production of directory listings confined to current directory.
  2304.  
  2305. FIN@\Shutting down the server (applies also to BYE) disabled entirely.
  2306.  
  2307. GET@\Getting files from the server confined to current directory.
  2308.  
  2309. HOST@\Execution of all REMOTE HOST (DOS) commands disabled entirely.
  2310.  
  2311. SEND@\Forces files sent to server into current directory.
  2312.  
  2313. SPACE@\Asking the server for a disk space report, disabled.
  2314.  
  2315. TYPE@\REMOTE TYPE files confined to current directory.
  2316.  
  2317. ALL@\All of the above.
  2318.  
  2319. TEK@\Automatic invocation of Tektronix graphics mode by host commands.  This
  2320. function is not related to server mode, and is not included in the ALL term.
  2321. @end<description>
  2322. For reasons which should be obvious, the Kermit server does not provide a
  2323. REMOTE ENABLE command!
  2324.  
  2325. @Subheading<The GET Command>
  2326.  
  2327. Syntax: @q<GET @i{remote-filespec}>
  2328.  
  2329. The GET command requests a Kermit server to send the file or file group
  2330. specified by @i<remote-filespec>.  This command can be used only when Kermit-MS
  2331. has a Kermit server active on the other end of the connection.  This usually
  2332. means that you have CONNECTed to the other system, logged in, run Kermit there,
  2333. issued the SERVER command, and escaped back (e.g. @qq<^]C>) to the local
  2334. Kermit-MS.  In the case of LAN operation, a Kermit server must be running
  2335. somewhere on the network.  If the remote Kermit does not have a SERVER command,
  2336. then you should use SEND and RECEIVE as described above.
  2337.  
  2338. You may use the GET command in a special way to specify a different name for
  2339. storing the incoming file.  Just type GET alone on a line, and you will be
  2340. prompted separately for the remote filespec and the local filespec:
  2341. @Begin(Example)
  2342. Kermit-MS>@ux(get)
  2343.  Remote Source File: @ux(com1 txt)
  2344.  Local Destination File: @ux(a:xcom1.txt)
  2345. @End(Example)
  2346. The local file name may contain a device field, and/or a directory
  2347. specification.  Device and directory specifications in the local destination
  2348. file name work the same way as in the RECEIVE command.  The multiline GET
  2349. command is provided so that the distinction between the two files is always
  2350. clear, which would not otherwise be the case if the foreign filename had spaces
  2351. in it.
  2352.  
  2353. The remote filespec is any string that can be a legal file specification for
  2354. the remote system; it is not parsed or validated locally.  It can contain
  2355. whatever wildcard or file-@|group notation is valid on the remote system,
  2356. including spaces. If the string needs to begin with a question mark (?) then
  2357. use a sharp sign (#) instead to avoid Kermit's help message; it will be
  2358. transmitted as a question mark.
  2359.  
  2360. Once the file transfer begins, the GET command behaves exactly like the RECEIVE
  2361. command.
  2362.  
  2363. @i<Warning:>  If the remote filespec is to contain a semicolon, @i<and> the
  2364. GET command is being issued from a TAKE command file, you must prefix the
  2365. semicolon with a backslash.  Otherwise, all characters beginning with the
  2366. semicolon will be ignored:
  2367. @example<get me.home\;2>
  2368.  
  2369. @subsection(Commands for Controlling Remote Kermit Servers)
  2370.  
  2371. The BYE, FINISH, and LOGOUT commands allow you to shut down a remote Kermit
  2372. server:
  2373. @Begin(Description,leftmargin +8,indent -8,group,blanklines hinge)
  2374. @q<BYE>@\When communicating with a remote Kermit server, use the BYE command to
  2375. shut down the server, log out its job, and exit locally from Kermit-MS to DOS.
  2376. On local area networks, BYE also terminates the network session.
  2377.  
  2378. @q<FINISH>@\Like BYE, FINISH shuts down the remote server.  However, FINISH
  2379. does not log out the server's job.  You are left at Kermit-MS prompt level so
  2380. that you can connect back to the job on the remote system.  On local area nets,
  2381. FINISH shuts down the MS-Kermit server, but in a way that allows it to be
  2382. restarted as if no interruption had occurred.
  2383.  
  2384. @q<LOGOUT>@\The LOGOUT command is identical to the BYE command, except you will
  2385. remain at Kermit-MS prompt level, rather than exit to DOS, so that you can
  2386. establish or use another connection without having to restart MS-Kermit.
  2387. @End(Description)
  2388.  
  2389. @subHeading<The REMOTE Commands>
  2390.  
  2391. The REMOTE keyword is a prefix for a number of commands.  It indicates that the
  2392. command is to be performed by a remote Kermit server.  Not all Kermit servers
  2393. are capable of executing all of these commands, and some Kermit servers may be
  2394. able to perform functions for which Kermit-MS does not yet have the
  2395. corresponding commands.  In case you send a command the server cannot execute,
  2396. it will send back a message stating that the command is unknown to it.  If the
  2397. remote server can execute the command, it will send the results, if any, to
  2398. your screen.
  2399.  
  2400. Here are the REMOTE commands that Kermit-MS may issue:
  2401. @begin<description,leftmargin +8,indent -8,group,blanklines hinge>
  2402. @q<REMOTE CWD >[@i<directory>]@\(Also REMOTE CD) Ask the server to Change your
  2403. Working Directory on the remote host, that is, the default source and
  2404. destination area for file transfer and management.  You will be prompted for a
  2405. password, which will not echo as you type it.  If you do not supply a password
  2406. (i.e. you type only a carriage return), the server will attempt to access the
  2407. specified directory without a password.  If you do not supply a directory name,
  2408. your default or login directory on the remote system will be assumed and you
  2409. will not be prompted for a password.
  2410.  
  2411. @q<REMOTE DELETE >@i<filespec>@\Ask the server to delete the specified file or
  2412. files on the remote system.  In response, the server may display a list of
  2413. the files that were or were not successfully deleted.
  2414.  
  2415. @q<REMOTE DIRECTORY >[@i<filespec>]@\Ask the server to display a directory
  2416. listing of the specified files.  If no files are specified, then the list
  2417. should include all files in the current working directory.
  2418.  
  2419. @q<REMOTE HELP >@\Ask the server to list the services it provides.
  2420.  
  2421. @q<REMOTE HOST >[@i<command>]@\Ask the server to send the command to the remote
  2422. system's command processor for execution.
  2423.  
  2424. @q<REMOTE KERMIT >@i<command>@\Send the command to the remote Kermit for
  2425. interpretation as a Kermit command in the remote Kermit server's own
  2426. command syntax.
  2427.  
  2428. @q<REMOTE LOGIN >@i<user>@\Password and account are always solicted via
  2429. prompts.  A carriage return response corresponds to an empty entry.  REMOTE
  2430. LOGIN applies only to a remote Kermit server and not to a remote operating
  2431. system; an MS Kermit server does not understand the command.
  2432.  
  2433. @q<REMOTE MESSAGE >@i<text>@\Send the one line text message to be displayed on
  2434. the Server's screen.
  2435.  
  2436. @q<REMOTE SPACE >[@i<directory>]@\Ask the server to provide a brief summary of
  2437. disk usage in the specified area on the remote host or, if none specified, the
  2438. default or current area.
  2439.  
  2440. @q<REMOTE TYPE >@i<filespec>@\Ask the server to display the contents of the
  2441. specified remote file or files on your screen.
  2442.  
  2443. @q(REMOTE WHO [@i<who-spec>])@\Ask the server to list actively logged on
  2444. users; optional who-spec qualifies the list and uses the syntax of the
  2445. server system.
  2446. @end<description>
  2447.  
  2448. @Subheading<The Mail Command>
  2449. @index<MAIL Command>
  2450. Syntax:  @q<MAIL> @i{filespec} @i(address)
  2451.  
  2452. The MAIL command is a very close relative of Kermit's SEND command.  Mail sends
  2453. a file, or file group, to a Kermit server with instructions (in an Attribute
  2454. packet) to submit the file(s) to the host's Mailer utility rather than store
  2455. them on disk.  To round out a mail request a field following the filename is
  2456. required, and into it we place the address to which the files are to be mailed.
  2457. Mail addresses vary substantially, but several common forms are "username",
  2458. "username@q<@@>host", and "host@q<::>username".  The MAIL command will work
  2459. only if the Kermit server understands it, otherwise the mail request will be
  2460. rejected before any files are sent.  Kermit-MS can send mail but it cannot
  2461. receive it, because MS-DOS does not have a mail facility.  When sending, there
  2462. is no way to transmit any fields other than the recipient's address and the
  2463. message body; fields like subject and cc are not supported.
  2464.  
  2465. @subsection<The LOG and CLOSE Commands>
  2466. @index<LOG Command>@index<CLOSE Command>
  2467. @label<-mslogcmd>
  2468. @begin<format>
  2469. Syntax: @q(LOG {PACKET, SESSION, TRANSACTION} )[@i<filespec>]
  2470.         @q(CLOSE {PACKET, SESSION, TRANSACTION})
  2471. @end<format>
  2472.  
  2473. The LOG command tells MS-Kermit to record the terminal session, file transfer
  2474. transactions, or the file transfer protocol packets themselves in a log file.
  2475. If the log file already exists then new material is appended to it.  Open log
  2476. files may be closed (and the associated logging disabled) using the CLOSE
  2477. command.  Open log files are also closed when you EXIT from Kermit.
  2478.  
  2479. LOG SESSION is used to record your terminal emulation typescript.  It
  2480. was described above, in the section on file transfer.
  2481.  
  2482. @subheading(The LOG TRANSACTION Command)
  2483. @index(LOG TRANSACTION)
  2484. Syntax: @q(LOG TRANSACTION )[@i<filespec>]
  2485.  
  2486. The Transaction log is a file recording a pair of text lines describing each
  2487. file transfer (SEND, GET, RECEIVE, or some REMOTE commands). The lines indicate
  2488. the local filename (and remote name if different), the time and date of the
  2489. start of the transfer, the number of bytes transferred, and the status of the
  2490. transfer.  New entries are always appended to old to prevent loss of records.
  2491. The default filename is @q<TRANSACT.LOG>.  The command SHOW LOGGING displays
  2492. the current names and which logs are active.  The command CLOSE TRANSACTION
  2493. will voluntarily terminate this class of log; otherwise, it will be closed
  2494. automatically when Kermit exits.
  2495.  
  2496. @subheading(The LOG PACKETS Command)
  2497. @index(LOG PACKETS)
  2498. Syntax: @q(LOG PACKETS )[@i<filespec>]
  2499.  
  2500. The packet log is for diagnostic purposes and records each Kermit protocol
  2501. packet sent and received in printable format.  Control characters are written
  2502. as caret-letter and characters with the high bit set are shown as their 7-bit
  2503. part preceeded by a tilde.  The default filename is @q<PACKET.LOG>.  If you
  2504. experience difficulty with file transfers the packet log is valuable in
  2505. discovering who said what to whom, even though a copy of the Kermit book is
  2506. needed to unravel the meaning of each character in a packet.
  2507.  
  2508. @newpage()
  2509. @Subsection<The SET Command>
  2510. @label(-msset)
  2511.  
  2512. @begin<format,below 1>
  2513. Syntax: @q<SET @i(parameter )[@i(parameter)] @i(value)>
  2514. @end<format>
  2515.  
  2516. The SET command establishes or modifies parameters for file transfer or
  2517. terminal connection.  You can examine their values with the SHOW or STATUS
  2518. commands.  The following SET commands are available in Kermit-MS:
  2519.  
  2520. @blankspace(1)
  2521. @Begin(Format,spread 0,need 5)
  2522. @tabclear()@tabset(2.0inches)
  2523. @>ALARM@\  Set alarm clock time, for IF ALARM testing
  2524. @>ATTRIBUTES@\  Controls whether MS-Kermit uses Attribute packets
  2525. @>BAUD@\  Communications port line speed (synonym for SPEED)
  2526. @>BELL@\  Whether to beep at the end of a transaction
  2527. @>BLOCK-CHECK-TYPE@\  Level of error checking for file transfer
  2528. @>COUNT@\  Variable for TAKE file and macro IF COUNT testing
  2529. @>DEBUG@\  Display packet contents during file transfer
  2530. @>DEFAULT-DISK@\  Default disk drive for file i/o
  2531. @>DELAY@\  Wait number seconds before Sending a file
  2532. @>DESTINATION@\  Default destination device for incoming files
  2533. @>DISPLAY@\  For selecting the type of file transfer display
  2534. @>DUMP@\  Screen dump file (or device) name
  2535. @>END-OF-LINE@\  Packet termination character
  2536. @>EOF@\  Method for determining or marking end of file
  2537. @>ERRORLEVEL@\  Value returned to DOS Batch files
  2538. @>ESCAPE@\  Escape character for CONNECT
  2539. @>FLOW-CONTROL@\  Enable or disable XON/XOFF
  2540. @>HANDSHAKE@\  Half-duplex line turnaround option
  2541. @>INCOMPLETE@\  What to do with an incompletely received file
  2542. @>INPUT@\  Behavior of INPUT command for scripts
  2543. @>KEY@\  Specify key redefinitions
  2544. @>LOCAL-ECHO@\  Specify which computer does the echoing during CONNECT
  2545. @>MODE-LINE@\  Whether to display a mode line during terminal emulation
  2546. @>PARITY@\  Character parity to use
  2547. @>PORT@\  Select a communications port
  2548. @>PROMPT@\  Change the "@q(Kermit-MS>)" prompt to something else
  2549. @>RECEIVE@\  Request remote Kermit to use specified parameters
  2550. @>REMOTE@\  For running Kermit-MS interactively from back port
  2551. @>RETRY@\  Packet retransmission threshold
  2552. @>SEND@\  Use the specified parameters during file transfer
  2553. @>SERVER@\  Parameters for server mode (command wait timeout)
  2554. @>SPEED@\  Communications port line speed (synonym for BAUD)
  2555. @>TAKE-ECHO@\  Control echoing of commands from TAKE files
  2556. @>TERMINAL@\  Emulation and parameters
  2557. @>TIMER@\  Enable/disable timeouts during file transfer
  2558. @>TRANSLATION@\  Enable/disable/specify conversion of arriving characters
  2559. @>WARNING@\  Specify how to handle filename collisions
  2560. @End(format)
  2561.  
  2562. The SET commands are now described in detail, in alphabetical order.
  2563.  
  2564. @Subheading<SET ALARM>
  2565.  
  2566. Syntax: @q<SET ALARM {@i(seconds, hh:mm:ss)}>
  2567.  
  2568. @Index<Alarm>
  2569.  
  2570. The alarm is a timer, like an alarm clock, available for testing by IF ALARM
  2571. statements.  The alarm time is given as seconds from the present or as a
  2572. 24-hour specific time of day.  Both need to be within 12 hours of the present
  2573. to avoid being mistaken for times in the past.  SHOW SCRIPT displays the
  2574. current alarm setting.
  2575.  
  2576. @Subheading<SET ATTRIBUTES>
  2577.  
  2578. Syntax: @q<SET ATTRIBUTES {ON, OFF}>
  2579.  
  2580. @Index<Attributes>
  2581. Disables or enables use of Kermit file Attribute protocol packets, which
  2582. contain the size, time, and date of files transferred using the Kermit
  2583. protocol.  This command is a safety feature so that a small misunderstanding
  2584. with another Kermit cannot block transfers.  SHOW FILE tells whether
  2585. attributes are on or off; they are normally ON.
  2586.  
  2587. @Subheading<SET BAUD>
  2588.  
  2589. Syntax: @q<SET BAUD @i{number}>
  2590.  
  2591. Synonym for SET SPEED (q.v.).
  2592.  
  2593. @Subheading<SET BELL>
  2594. @Index<Bell>
  2595. Syntax: @q<SET BELL {ON, OFF}>
  2596.  
  2597. Specifies whether the bell (beeper) should sound upon completion of a file
  2598. transfer operation.  Normally ON.
  2599.  
  2600. @Subheading<SET BLOCK-CHECK-TYPE>
  2601. @Index<Block Check>@index<Checksum>@index<CRC>
  2602. Syntax: @q<SET BLOCK-CHECK-TYPE {1, 2, 3}>
  2603.  
  2604. Selects the error detection method: a 1-character 6-bit checksum (the normal
  2605. case), a 2-character 12-bit checksum, or a 3-character 16-bit cyclic redundancy
  2606. check (CRC).  If the other Kermit program is not capable of type 2 or 3
  2607. checking methods, automatic fallback to type 1 will occur.  The more secure
  2608. type 2 and 3 block checks take essentially no more execution time than the
  2609. simple 1 character checksum.  SET BLOCK 3 is a stronger check than SET BLOCK 2.
  2610. SET BLOCK 2 or 3 is recommended for use with long packets (see below), noisy
  2611. communication lines, binary (8-bit data) files, and text files containing
  2612. critical data (budgets, grades, etc).
  2613.  
  2614. @Subheading<SET COUNT>
  2615.  
  2616. Syntax: @q<SET COUNT @i{number}>
  2617.  
  2618. @Index<Count> Set the value of the script COUNT variable to be between 0 and
  2619. 65535. COUNT is used with IF COUNT to construct counted loops in script TAKE
  2620. files and macros.  Each active TAKE file or macro uses a private version of
  2621. COUNT.  The default value is zero, and the SHOW SCRIPT command displays the
  2622. current value (meaningful only when given within a TAKE file or macro).
  2623.  
  2624. @Subheading<SET DEBUG>
  2625. @Index<Debugging>
  2626. Syntax: @q<SET DEBUG {PACKET, SESSION, ON, OFF}>
  2627.  
  2628. With DEBUG PACKET, Kermit will display the actual packets on your screen during
  2629. file transfer.  With the normal file transfer display, regular-length packets
  2630. sent and received are displayed in fixed-size slots.  The display of
  2631. extended-length packets, however (see SET RECEIVE PACKET-LENGTH), tends to
  2632. overlap.  If this bothers you, then also SET DISPLAY SERIAL, or LOG the packets
  2633. rather than displaying them.
  2634.  
  2635. With DEBUG SESSION, during terminal emulation (on the IBM PC, Rainbow, and a
  2636. few others), control characters are displayed in uparrow (@qq<^>) notation and
  2637. characters with the 8th bit set are preceded by the tilde (@qq<~>) sign, and
  2638. your session log (if any) will record 8-bit bytes, rather than 7-bit ASCII,
  2639. regardless of SET DISPLAY or SET PARITY.  Character translation (SET
  2640. TRANSLATION INPUT) is not done during session debugging.  The effect of SET
  2641. DEBUG SESSION during terminal connection can be disconcerting, but it gives you
  2642. a convenient line monitor equivalent to a specialized device that costs several
  2643. thousand dollars, and it can prove very handy for tracking down data
  2644. communication problems.
  2645.  
  2646. SET DEBUG ON turns on both SESSION and PACKET debugging, and SET DEBUG OFF
  2647. turns them both off.
  2648.  
  2649. @subheading<SET DEFAULT-DISK>
  2650. Syntax: @q<SET DEFAULT-DISK @i(x):[@i(directory)]>
  2651.  
  2652. Specify the default disk drive to use for file transfer, directory listings,
  2653. and so forth.  Equivalent to typing the DOS command for changing disks (@q<A:>,
  2654. @q<B:>, etc).  Affects Kermit and all inferior processes, but when you exit
  2655. from Kermit, you will still have the same default disk as when you entered.
  2656. As a convenience, a directory may be specified with or without the drive
  2657. to change one or the other or both.  This command is a synonym for CWD (CD).
  2658.  
  2659. @subheading<SET DELAY>
  2660. Syntax: @q<SET DELAY @i(number)>
  2661.  
  2662. Wait the specified number of seconds before starting a file transfer.  Intended
  2663. for use when the other side needs appreciable time to become ready, such as
  2664. rearranging cables, changing programs, etc., or when MS-DOS Kermit is the
  2665. remote Kermit (e.g. after CTTY COM1, SET REMOTE ON).  The @i<number> is 0 to 63
  2666. seconds, normally 0.
  2667.  
  2668. @Subheading<SET DESTINATION>
  2669. Syntax: @q<SET DESTINATION {DISK, PRINTER, SCREEN}>
  2670. @index<Printer>
  2671.  
  2672. SET DESTINATION PRINTER will cause incoming files to be sent directly to the
  2673. printer; SCREEN will send output normally destined for the disk to the
  2674. screen.  The normal destination is DISK.  SET DESTINATION affects only files
  2675. transferred with SEND, GET, or RECEIVE; it cannot be used to reroute the
  2676. output from REMOTE server commands.
  2677.  
  2678. @Subheading<SET DISPLAY>
  2679. @index<Display, File Transfer>
  2680. Syntax: @q<SET DISPLAY {QUIET, REGULAR, SERIAL, 7-BIT, 8-BIT}>
  2681.  
  2682. During file transfer, MS-DOS Kermit's regular display is a formatted screen
  2683. whose fields are randomly updated with file names, packet numbers, error
  2684. counts, percent done, error messages, and so forth, as shown in Figure
  2685. @ref<-msftscreen>.
  2686.  
  2687. If you wish to run Kermit-MS interactively through the back port, for instance
  2688. after the operator has done CTTY COM1, you must give the command SET REMOTE ON
  2689. (which, currently at least, is equivalent to SET DISPLAY QUIET); this
  2690. suppresses the file transfer display screen, so that the display won't
  2691. interfere with the file transfer itself.  You can also use this command to
  2692. suppress the display in local mode, in case you are using a system that allows
  2693. you to do other work while file transfer proceeds in the background.
  2694.  
  2695. @index<Handicapped>@index<Speaking Device>@Index<Blind>@index<Printer>
  2696.  If you have your PC connected to a speaking device (a common practice for
  2697. visually impaired people), or you are logging the display screen to a printer
  2698. (using DOS @q<^P> or @q[@w{kermit > prn}]), the random nature of the regular
  2699. display will make the results of little use.  SET DISPLAY SERIAL is provided
  2700. for this purpose; it causes the program to report progress "serially" on the
  2701. screen.  In serial mode, error messages are preceeded with the word "Error" and
  2702. repeat messages with the word "Retry".  Packets are numbered as dots with every
  2703. tenth being a plus sign.  The packet display is automatically broken across
  2704. lines at every 70th packet.  The serial display makes much more sense when
  2705. spoken than does the regular display.
  2706.  
  2707. The serial display does not show the percent and kilobytes transferred.
  2708. It is the default display style for generic MS-DOS Kermit; REGULAR is the
  2709. default for all others.
  2710.  
  2711. The last two parameters, 7-BIT and 8-BIT, control the size of characters sent
  2712. to the screen during terminal emulation.  7-BIT is the default and includes all
  2713. ASCII characters.  8-BIT is useful with national and line drawing
  2714. characters@index<National Characters>.
  2715.  
  2716. @Subheading<SET DUMP>
  2717. @index<Screen Dump>@index<Dump Screen>
  2718. Syntax: @q<SET DUMP >@i(filespec)
  2719.  
  2720. On those systems that support this feature, change the file or device name of
  2721. the screen dump file.  The normal file name is @q<KERMIT.SCN>.  See the section
  2722. on terminal emulation for details about screen dumps.  If the specified file
  2723. already exists then new material is appended to old.  If you want to start a
  2724. new screen dump file, delete the old one first.
  2725.  
  2726. @subheading(SET END-OF-LINE)
  2727. Syntax: @q(SET END-OF-LINE )@i{number}
  2728.  
  2729. If the remote system needs packets to be terminated by anything other than
  2730. carriage return, specify the decimal value, 0-31, of the desired ASCII
  2731. character.  Equivalent to SET SEND END-OF-LINE (SET END-OF-LINE is kept only
  2732. for historical reasons, and the parameter really should be called END-OF-PACKET
  2733. anyway.)
  2734.  
  2735. @subheading(SET EOF)
  2736. @Index(End Of File)
  2737. Syntax: @q(SET EOF {CTRL-Z, NOCTRL-Z})
  2738.  
  2739. Controls how the end of file is handled.  CTRL-Z specifies a Control-Z
  2740. character should be appended to the end of an incoming file.  Certain MS-DOS
  2741. text editors and other applications require files to be in this format.  For
  2742. outbound files, treat the first Control-Z as the end of the local file, and do
  2743. not send it or any subsequent characters.  NOCTRL-Z is the default; incoming
  2744. files are stored, and MS-DOS files are sent, exactly as is, in their entirety.
  2745. Use SHOW FILE to see the current SET EOF status.
  2746.  
  2747. @Subheading<SET ERRORLEVEL>
  2748.  
  2749. Syntax: @q<SET ERRORLEVEL @i{number}>
  2750.  
  2751. @Index<Errorlevel>
  2752. Forces the DOS "errorlevel" variable to a given value.  This is used
  2753. in scripts when other controls or tests determine that the cumulative
  2754. errorlevel reported to DOS Batch when Kermit exits needs to be modified.
  2755. The number can be 0 to 255 decimal.
  2756.  
  2757. @Subheading<SET ESCAPE>
  2758. @Index<Escape Character for CONNECT>
  2759. Syntax: @q<SET ESCAPE @i{character}>
  2760.  
  2761. Specify the control character you want to use to "escape" from remote
  2762. connections back to Kermit-MS.  On most systems the default is @qq(^])
  2763. (Control-@|Rightbracket), which was chosen because it is a character you would
  2764. otherwise rarely type.
  2765.  
  2766. The @i<character> is entered literally after SET ESCAPE or in backslash number
  2767. form (@q<\29>), and should be chosen from the ASCII control range.  It is not
  2768. possible to use non-ASCII characters (like function keys) for this purpose (but
  2769. see SET KEY for a way around this restriction).
  2770.  
  2771. @Subheading<SET FLOW-CONTROL>
  2772. @Index<Flow Control>@index<XON/XOFF>
  2773. Syntax: @q<SET FLOW-CONTROL {XON/XOFF, NONE}>
  2774.  
  2775. Specify the full duplex flow control to be done on the currently selected port.
  2776. The options are XON/XOFF and NONE.  The specified type of flow control will be
  2777. done during both terminal emulation and file transfer.  By default, XON/XOFF
  2778. flow control is selected.  XON/XOFF should not be used on half-duplex (local
  2779. echo) connections, or when the other system does not support it.  If XON/XOFF
  2780. is used, HANDSHAKE should be set to NONE.
  2781.  
  2782. @Subheading<SET HANDSHAKE>
  2783. @Index<Handshake>
  2784. Syntax: @q<SET HANDSHAKE {CODE @i<number>, BELL, CR, LF, NONE, XOFF, XON}>
  2785.  
  2786. Specify any half-@|duplex line turnaround handshake character to be used during
  2787. file transfer on the currently selected port.  The CODE @i<number> form allows
  2788. any ASCII character to be specified by its decimal ASCII code.  Handshake is
  2789. NONE by default; if set to other than NONE, then FLOW-CONTROL should be set to
  2790. NONE.  In operation the handshake character is sought at the end of each
  2791. received packet, following the normal END-OF-LINE character, but is not sent
  2792. for outgoing packets.
  2793.  
  2794. @Subheading<SET INCOMPLETE>
  2795. @Index(Incomplete File Disposition)
  2796. Syntax: @q<SET INCOMPLETE {DISCARD, KEEP}>
  2797.  
  2798. Specifies what to do with files that arrive incompletely: discard them or
  2799. keep them.  They are normally discarded.
  2800.  
  2801. @Subheading<SET INPUT>
  2802. @Index<INPUT Command>
  2803. Syntax: @q<SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}>
  2804.  
  2805. This command is described in Section @ref<-msscp>, SCRIPTS.
  2806.  
  2807. @Subheading<SET KEY>
  2808. @Index(Key Redefinition)
  2809. Syntax: @q<SET KEY @i(key-specifier) [@i(key-definition)]>@*
  2810. @ @ @i<Also:> @q<SET KEY> {ON, OFF, CLEAR}
  2811.  
  2812. @begin<quotation>
  2813. @i<WARNING:> The format and functions of this command have changed
  2814. substantially since version @q<2.29B> and earlier.  The changes were made in
  2815. order to allow key redefinition to work on a wider variety of systems and
  2816. keyboards without customization of the program source code for each
  2817. configuration.  See section @ref<-msdiffs> for further details.
  2818. @end<quotation>
  2819.  
  2820. Typical uses of SET KEY:
  2821. @begin<itemize>
  2822. You're used to having the ESC key in the upper left corner of the keyboard, but
  2823. your new PC keyboard has an accent grave (@qq<`>) there.  You can use SET KEY
  2824. to make the accent key transmit an ESC, and you can assign accent grave to some
  2825. other key.
  2826.  
  2827. You send a lot of electronic mail, and always sign it the same way.  You can
  2828. put your "signature" on a single key to save yourself a lot of repetitive
  2829. typing.
  2830.  
  2831. You must set up your PC's function keys or numeric keypad to work properly
  2832. with a host application.
  2833.  
  2834. You have trouble with Kermit's 2-character escape sequences (like Ctrl-@q<]>
  2835. C), and you want to assign these functions to single keys, like F10.
  2836. @end<itemize>
  2837. The SET KEY command does these things and more, and SHOW KEY gives us
  2838. assistance.  A key can be defined to:
  2839. @begin(itemize,spread 0)
  2840. send a single character other than what it would normally send,
  2841.  
  2842. send a string of multiple characters,
  2843.  
  2844. invoke a CONNECT-mode Kermit action verb,
  2845.  
  2846. send itself again.
  2847. @end(itemize)
  2848.  
  2849. SET KEY specifies that when the designated key is struck during terminal
  2850. emulation, the specified character or string is sent or the specified Kermit
  2851. action verb is performed.  Key definitions operate only during CONNECT, not at
  2852. @q(Kermit-MS>) or DOS command level.
  2853.  
  2854. The key-@|specifier is the identification of the key expressed in
  2855. system-@|dependent terms.  This can be a letter, such as Q for the key which
  2856. produces an uppercase Q, or the numeric ASCII value of the letter in backslash
  2857. notation (e.g. @qq<\81>), or else the numerical "scan code" observed by the
  2858. system when the key is pressed (e.g. "\3856" for Ctrl-Alt-Shift-Q on an IBM
  2859. PC).  Material printed on keycaps is not necessarily a guide to what the
  2860. key-@|specifier should be.  When the word CLEAR is used in place of a
  2861. key-@|specifier, all key definitions are cleared and then any built-in
  2862. definitions are restored.
  2863.  
  2864. A string definition is one or more characters, including 8-bit values
  2865. expressed in backslash form, such as
  2866. @begin(example)
  2867. SET KEY \315 directory\13     @r[IBM F1 key sends @qq"directory<cr>"]
  2868. SET KEY S X                   @r[S key sends upper case X (a mean trick)]
  2869. SET KEY T \27[m               @r<T key sends three bytes:> ESC [ m
  2870. SET KEY \2336 {del }xxx       @r<Alt-D sends ">del @r<">
  2871. SET KEY \324 \Kexit           @r(F10 escapes back to) Kermit-MS> @r(prompt.)
  2872. @end(example)
  2873.  
  2874. The string begins with the first non-spacing character following the key
  2875. identification and continues until the end of line, exclusive of any trailing
  2876. spaces.  If a semicolon comment is used and the definition is given in a TAKE
  2877. file, the line ends at the last non-spacing character before the semicolon.
  2878. Curly braces, @q<{>@value<ellips>@q<}>, can be use to delimit the string in
  2879. case you want the definition to include trailing spaces.  All text after the
  2880. closing bracket is ignored.
  2881.  
  2882. This manual does not contain a list of all the scan codes for all the keys on
  2883. all the keyboards on all the PCs supported by MS-Kermit -- that would be a
  2884. manual in itself.  Rather, in order to obtain the key-@|specifier for the SET
  2885. KEY command, you must type a SHOW KEY command and then press the desired key or
  2886. key combination.  This will report a scan code that you can use as the key
  2887. specifier in a SET KEY command.  To do this for many keys is a laborious
  2888. process, so you should collect all your SET KEY commands into a file, which you
  2889. can TAKE, or put them in your @q<MSKERMIT.INI>@index(MSKERMIT.INI) file.
  2890.  
  2891. If you enter SET KEY by itself, with no key specifier, the command will prompt
  2892. you to press the selected key and again for the definition string.  Certain
  2893. characters, like ESC and CR, may not be entered literally into the string, but
  2894. can be included by inserting escape codes of the form @q<\nnn>, a backslash
  2895. followed by a 1- to 4-digit number corresponding to the ASCII value of the
  2896. desired character.  Where an ASCII digit follows directly after a backslash
  2897. number, confusion can be avoided by placing curly braces @q<{}> around the
  2898. backslashed number; thus, @q<\{27}5> represents the two ASCII characters ESC
  2899. and 5.
  2900.  
  2901. Here is an example of the use of SET KEY to assign ESC (ASCII 27) to the accent
  2902. grave key.  First the user gets the key-specifier for the key:
  2903. @begin<example>
  2904. Kermit-MS>@ux<show key>
  2905.   Push key to be shown (? shows all): @ux<`>
  2906.   ASCII char: ` \96 decimal is defined as
  2907.   Self, no translation.
  2908. Free space: 129 key and 100 string definitions, 837 string characters.
  2909. @end<example>
  2910. The free space report says that 129 more keys may be redefined, and up to 100
  2911. of them may have multi-character strings assigned to them (as opposed to single
  2912. characters), and that there are 837 bytes left for these strings, in total.
  2913. Confident that there is enough space left for a new key definition, the user
  2914. proceeds:
  2915. @begin<example>
  2916. Kermit-MS>@ux<set key>
  2917.   Push key to be defined: @ux<`>
  2918.   Enter new definition: @ux<\27>
  2919. @end<example>
  2920.  
  2921. Once a key definition is constructed and tested, it may be entered on a
  2922. single line in a command file (such as @q<MSKERMIT.INI>@index(MSKERMIT.INI)):
  2923. @example<set key \96 \27>
  2924. To prevent accidents, SET KEY shows the current definition before asking for a
  2925. new one; enter a Control-C to keep the current definition, or a carriage return
  2926. to undefine the key, or a query mark @q<(?)> to see available choices.
  2927.  
  2928. The keyboard can be restored to its startup state, that is all redefinitions
  2929. removed and all built-in defitions restored, by using the keyword CLEAR in
  2930. place of the key identification:
  2931. @example[SET KEY CLEAR]
  2932. Undefined keys which do not send ASCII characters are trapped by the keyboard
  2933. translator and are rejected; a beep results from using an undefined non-ASCII
  2934. key.
  2935.  
  2936. @index<ANSI.SYS>
  2937. SET KEY OFF directs MS-Kermit to read keycodes from DOS, rather than BIOS, so
  2938. that console drivers like @q<ANSI.SYS> that operate at the DOS level may be
  2939. used during Kermit CONNECT sessions.  This would also apply to any special
  2940. keyboard replacements that come with DOS-level drivers.  SET KEY ON turns key
  2941. definition back on, and returns Kermit to processing keystrokes at the BIOS
  2942. level.
  2943.  
  2944. @subheading<Kermit Action Verbs>
  2945.  
  2946. An action verb is the shorthand expression for a named Kermit procedure, such
  2947. as "generate the proper sequence for a left arrow," "show status," "send
  2948. a BREAK," and others; verbs are complex actions and each verb has a name.
  2949. In a key definition the verb name is preceeded by backslash K (@q<\K>) to
  2950. avoid being confused with a string.  Verbs and strings cannot be used
  2951. together on a key.
  2952. @begin<example>
  2953. SET KEY \331 \Klfarr
  2954. SET KEY \2349 \Kexit
  2955. @end<example>
  2956. makes the IBM keyboard left arrow key execute the verb named @q<lfarr> which
  2957. sends the proper escape sequence for a VT102 left arrow key (which changes
  2958. depending on the internal state of the VT102).  The leading @q<\K> identifies
  2959. the definition as a Kermit verb, so no string can start as @q<\K> or as @q<\{K>
  2960. in upper or lower case (use @q<\92K>).  The second example has Alt-X invoking
  2961. the Leave-Connect-Mode verb "exit" (same as Kermit escape character @qq(^])
  2962. followed by C).
  2963.  
  2964. Each system has its own list of verbs and predefined keys.  Table @ref<-kverbs>
  2965. shows those available for the IBM PC family (there are also some additional
  2966. verbs for reassigning Heath or VT100 function keys, see section
  2967. @ref<-mslayout>).  The SET KEY command shows the list of available verbs when a
  2968. query mark @q<(?)> is given as a definition.  SHOW KEY displays all currently
  2969. defined keys or individually selected ones; SHOW KEY can be executed only
  2970. interactively.
  2971.  
  2972. @begin<table>
  2973. @bar()
  2974. @blankspace(1)
  2975. @begin<format,leftmargin +2,above 1,below 1,group>
  2976. @tabclear()@tabset(1.5inches)
  2977. @ux(Verb)@\@ux(Meaning)
  2978. \Kupscn@\Roll up (back) to previous screen
  2979. \Kdnscn@\Roll down (forward) to next screen
  2980. \Khomscn@\Roll up to top of screen memory
  2981. \Kendscn@\Roll down to end of screen memory (current position)
  2982. \Kupone@\Roll screen up one line
  2983. \Kdnone@\Roll screen down one line
  2984. \Kprtscn@\Print the current screen
  2985. \Kdump@\Append the current screen to dump file
  2986. \Kholdscrn@\Toggle hold screen mode
  2987. \Klogoff@\Turn off session logging
  2988. \Klogon@\Turn on session logging
  2989. \Ktermtype@\Toggle terminal type
  2990. \Kreset@\Reset terminal emulator to initial state
  2991. \Kmodeline@\Toggle modeline off/on
  2992. \Kbreak@\Send a BREAK signal
  2993. \Klbreak@\Send a "long BREAK" signal
  2994. \Khangup@\Drop DTR so modem will hang up phone
  2995. \Knull@\Send a null (ASCII 0)
  2996. \Kdos@\"Push" to DOS
  2997. \Khelp@\Display CONNECT help message
  2998. \Kstatus@\Display STATUS message
  2999. \Kterminals@\Invoke user-defined macro TERMINALS, if any
  3000. \Kterminalr@\Invoke user-defined macro TERMINALR, if any
  3001. \Kexit@\Escape back from CONNECT mode
  3002. \Kgold,\Kpf1@\VT102 keypad function key PF1
  3003. \Kpf2..\Kpf4@\VT102 keypad function keys
  3004. \Kkp0..\Kkp9@\VT102 keypad numeric keys
  3005. \Kkpdot,\Kkpminus,\Kkpcoma,\Kkpenter@ @ @ Other VT102 keypad keys
  3006. \Kuparr,\Kdnarr,\Klfarr,\Krtarr@ @ @ VT102 cursor (arrow) keys
  3007. @end<format>
  3008. @caption(Kermit-MS Verbs for the IBM PC Family)
  3009. @tag(-kverbs)
  3010. @bar()
  3011. @end(table)
  3012.  
  3013. Some systems have preset key definitions when Kermit first begins (those for
  3014. the IBM PC are shown in section @ref<-mslayout>).  You can find out what they
  3015. are on your system by typing SHOW KEY, and then question mark on the next line.
  3016. You may supplement or change the predefined keys with SET KEY commands typed
  3017. interactively or in @q<MSKERMIT.INI> or other command files.
  3018.  
  3019. @index<ANSI.SYS>@index<SuperKey>@index<ProKey>
  3020.  The MS-Kermit CONNECT command may be used in conjunction with certain console
  3021. drivers that do their own key redefinitions.  Since MS-Kermit intercepts
  3022. keystrokes at the BIOS level, drivers like @q<ANSI.SYS> which work at the DOS
  3023. level will have no effect during CONNECT, even though they work at MS-Kermit
  3024. command level.  Other drivers, like SuperKey and ProKey, work at the BIOS
  3025. level, and their key assignments will remain effective during Kermit terminal
  3026. sessions, and additional Kermit SET KEY assignments may be made "on top" of
  3027. them.
  3028.  
  3029. @Subheading<SET LOCAL-ECHO>
  3030. @Index<Local Echo>
  3031. Syntax: @q<SET LOCAL-ECHO {ON, OFF}>
  3032.  
  3033. Specify how characters are echoed during terminal emulation on the currently
  3034. selected port.  ON specifies that characters are to be echoed by Kermit-MS
  3035. (because neither the remote computer nor the communications circuitry has been
  3036. requested to echo), and is appropriate for half-@|duplex connections.
  3037. LOCAL-ECHO is OFF by default, for full-@|duplex, remote echo operation.
  3038.  
  3039. @subheading(SET MODE-LINE)
  3040. @index<Mode Line>
  3041. Syntax: @q<SET MODE-LINE {ON, OFF}>
  3042.  
  3043. On systems, like the IBM PC family, which are capable of displaying a status,
  3044. or "mode" line on the 25th (or bottom) line during terminal connection, disable
  3045. or enable this function.  This command has no effect on systems that do not
  3046. display a mode line during connect.
  3047.  
  3048. The mode line shows several important facts about the connection, like which
  3049. port is being used, the transmission speed and parity, the current escape
  3050. character, etc.  When the mode line is enabled, it may be turned on and off
  3051. using the CONNECT escape-level command M or the Kermit verb "modeline".
  3052.  
  3053. The mode line occupies the 25th line of those systems that have such a thing,
  3054. and is not affected by scrolling (on some systems that have large screens, the
  3055. mode line should appear on whatever the bottom line is, e.g. the 43rd).  When
  3056. emulating a VT102 or Heath-19, Kermit will allow the host to address the 25th
  3057. line directly using cursor positioning commands.  If this happens, Kermit will
  3058. remove its mode line and relinquish control of the 25th line to the host (as if
  3059. you had typed SET MODE OFF).  When the Tektronix, or no terminal at all, is
  3060. being emulated, the 25th line (if any) is available for scrolling.  If the mode
  3061. line is disabled by an application or by the command SET MODE OFF then the only
  3062. way to revive Kermit's mode line display is to give the command SET MODE ON.
  3063.  
  3064. @Subheading<SET PARITY>
  3065. @Index<Parity>
  3066. Syntax: @q<SET PARITY {EVEN, ODD, MARK, SPACE, NONE}>
  3067.  
  3068. Specify the character parity to be used on the currently selected port.  You
  3069. will need to SET PARITY to ODD, EVEN, MARK, or possibly SPACE when
  3070. communicating with a system, or over a network, or through modems,
  3071. concentrators, multiplexers, or front ends that require or impose character
  3072. parity on the communication line.  For instance, most IBM mainframe computers
  3073. use EVEN or MARK parity; @index(Telenet)Telenet normally uses MARK parity.  If
  3074. you neglect to SET PARITY when the communications equipment requires it, the
  3075. symptom may be that terminal emulation works (well or maybe only partially),
  3076. but file transfer or script INPUT commands do not work at all.
  3077.  
  3078. NONE means that no parity processing is done, and the 8th bit of each character
  3079. can be used for data when transmitting binary files.  This is the normal case.
  3080. If parity is other than none, then there will be 7 data bits (use of parity
  3081. with 8 data bits is not supported).
  3082.  
  3083. @Index<Eighth-Bit Prefix>@Index<Binary Files>
  3084.  If you have set parity to ODD, EVEN, MARK, or SPACE, then Kermit-MS will
  3085. request that binary files be transferred using 8th-bit-@|prefixing.  If the
  3086. other Kermit knows how to do 8th-bit-@|prefixing (this is an optional feature
  3087. of the Kermit protocol, and some implementations of Kermit don't have it), then
  3088. 8-bit binary files can be transmitted successfully.  If NONE is specified,
  3089. 8th-bit-@|prefixing will not be requested.  Note that there is no advantage to
  3090. using parity.  It reduces Kermit's file transfer efficiency without providing
  3091. additional error detection.  The SET PARITY command is provided only to allow
  3092. Kermit to adapt to conditions where parity is required, or 8-bit transmission
  3093. is otherwise thwarted.
  3094.  
  3095. If parity is in use, then the display during terminal emulation, as well as any
  3096. session log, will be 7-bit ASCII, unless you have SET DEBUG ON (q.v.).
  3097.  
  3098. There may be situations in which you require 7-bit ASCII with no parity during
  3099. terminal emulation, but still want to force 8th bit prefixing during file
  3100. transfer.  To accomplish this, SET PARITY SPACE.
  3101.  
  3102. @Index<INPUT Command>
  3103. The INPUT and TRANSMIT commands use 7 or 8 bits if parity@index<Parity> is
  3104. NONE, according to the SET DISPLAY command, and this may upset recognition of
  3105. received characters when the host unexpectedly sends them with its own parity.
  3106.  
  3107. @i<WARNING:> The SET PARITY command has no effect on a port used for printing.
  3108. @index<Printer>This is because printing is done by DOS, not Kermit.  Since
  3109. Kermit clears hardware parity on COM1 at startup, it is not recommended that
  3110. COM1 be used for a serial printer, unless the printer works with no parity.
  3111.  
  3112. @Subheading<SET PORT>
  3113. Syntax: @q<SET PORT {@i(number), COM@i[n], BIOS@i[n], NET [@i<nodename>], @~
  3114. UB-NET1 [@i<nodename>]}>
  3115.  
  3116. On machines with more than one communications port, select the port to use for
  3117. file transfer and CONNECT.  This command lets you use a different asynchronous
  3118. adapter, or switch between two or more simultaneous remote sessions.
  3119. Subsequent SET SPEED, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will
  3120. apply to this port only -- each port remembers its own parameters, so that you
  3121. may set them for each port and then switch between ports conveniently with the
  3122. SET PORT command.
  3123.  
  3124. SET @w(PORT 1) selects COM1, SET @w(PORT 2) selects COM2.  All versions default
  3125. to port 1, except for the IBM PCjr, which uses port 2 if its internal modem is
  3126. installed.  Additionally, COM3 and COM4@index<COM3 and COM4> are supported for
  3127. IBM PC/AT's and PS/2's, as explained in Section @ref<-msports>.
  3128.  
  3129. SET PORT BIOS@i<n>, on machines which support it, instructs Kermit to do serial
  3130. port input and output by Bios calls rather than going directly to the hardware
  3131. (@i<n> is a digit between 1 and 4).  The most important use is allowing
  3132. selected network packages to intercept such Bios calls and relay the characters
  3133. across the network.
  3134.  
  3135. @index<Generic MS-DOS Kermit>
  3136.  In "generic" MS-DOS Kermit, the following alternate forms allow you to
  3137. experiment with device names or numbers until you find the communication port:
  3138. @example(SET PORT {DEVICE, FILE-HANDLE})
  3139. Just type a carriage return after either of these commands, and you will be
  3140. prompted for a device name or a numeric port-handle.  Keep trying till you find
  3141. one that works. File-@|handle 3, the system auxillary device, is conventional
  3142. on many machines, as are device names COM1, COM2, and AUX.
  3143.  
  3144. MS-Kermit for the IBM PC family is able to operate over local area networks
  3145. through the NetBIOS interface.  The command
  3146. @example(SET PORT NET [@i<nodename>])
  3147. @index<SET PORT NETBIOS>@index<NetBIOS>
  3148. redirects communications the LAN board installed in the local computer and the
  3149. associated NetBIOS emulator software, if active, rather than the serial port or
  3150. the COM device driver.  It installs a unique Kermit node name in the local LAN,
  3151. so that other nodes can refer to it when files are transferred or terminal
  3152. emulation is done.  This name is displayed when you give the SET PORT NET
  3153. command.  The server should use SET PORT NET, and the client should use
  3154. SET PORT NET @i<nodename>, specifying the server's name, e.g. @q<mskermit.K>.
  3155. Note that alphabetic case is significant in node names!
  3156.  
  3157. Both the regular serial port and a network connection can be kept alive
  3158. simultaneously; clearly, only one can be used at a time under MS-DOS.  MS-DOS
  3159. 3.x is not required for Kermit network usage, but most LANS do need DOS 3.1 or
  3160. later for conventional file server work.  Kermit needs only the NetBIOS
  3161. emulator network software.
  3162.  
  3163. @index<SET PORT UB-NET1>
  3164. SET PORT UB-NET1 is implemented on the IBM PC version of Kermit to allow
  3165. connection to Ungermann-Bass Net One LAN NETCI interface and behaves
  3166. similarly to the NetBIOS method.
  3167.  
  3168. @subheading<SET PROMPT>
  3169. Syntax: @q(SET PROMPT [@i<string>])
  3170.  
  3171. This command allows you to change the MS-DOS Kermit program's prompt.  The
  3172. string may be enclosed in curly braces.  Control characters like ESC can be
  3173. included as backslashed numbers like @qq<\27>.  @index<ANSI.SYS>@q<ANSI.SYS>
  3174. and similar console drivers can be programmed through this command to get a
  3175. boldface, inverse, and/or blinking prompt.  The prompt string must be less than
  3176. 128 characters.  If the string is omitted (missing) Kermit's original prompt of
  3177. @qq(Kermit-MS>) is restored.
  3178.  
  3179. @Subheading[SET RECEIVE]
  3180. Syntax: @q(SET RECEIVE @i[parameter] @i[value])
  3181.  
  3182. This command lets you modify the ways in which MS-Kermit asks the other Kermit
  3183. to behave.  That is, it controls the file transfer protocol options for packets
  3184. sent to MS-Kermit by the other Kermit.  The parameters and values you specify
  3185. in the SET RECEIVE command are sent to the other Kermit during initial
  3186. negotiations.  Numbers may be specified as ordinary decimal numbers (74), or in
  3187. backslash notation (\x03F).
  3188. @Begin(Description,leftmargin +8,indent -8,group,blanklines hinge)
  3189. @q<END-OF-LINE >@i<number>@\The ASCII value of terminating character to look
  3190. for on incoming packets.  Normally carriage return.  Use this command if the
  3191. other Kermit is terminating its packets with some other control character.
  3192.  
  3193. @begin(multiple)
  3194. @q<PACKET-LENGTH >@i<number>@\Ask the remote Kermit to use the specified
  3195. maximum length for packets that it sends to Kermit-MS.  The normal length is 94
  3196. bytes.  Use this command to shorten packets if the communication line is noisy
  3197. or terminal buffers somewhere along the path are too small.  Shorter packets
  3198. decrease the probability that a particular packet will be corrupted, and will
  3199. reduce the retransmission overhead when corruption occurs, but will increase
  3200. the file transfer throughput.
  3201.  
  3202. @index<Long Packets>
  3203. If a length greater than 94 is specified, a protocol option called "long
  3204. packets" will be used, provided the other Kermit also supports it.  Kermit-MS
  3205. can receive extended-@|length packets up to 1000 bytes long.  Long Packets can
  3206. improve efficiency by reducing the per-packet overhead for a file, but they
  3207. will not be used unless you issue this command.  Before using this option,
  3208. ensure that the equipment on the communications pathway can absorb a long
  3209. packet, and that the connection is clean (retransmission of long packets is
  3210. expensive!).  You should also SET BLOCK-CHECK 2 or 3 for more reliable error
  3211. checking.
  3212. @end(multiple)
  3213.  
  3214. @q<PADCHAR >@i<number>@\Ask the remote Kermit to use the given control
  3215. character (expressed as a decimal number 0-31, or 127) for interpacket padding.
  3216. Kermit-MS should never require any padding.
  3217.  
  3218. @q<PADDING >@i<number>@\Ask the remote Kermit to insert the given number of
  3219. padding characters before each packet it sends.  MS-Kermit never needs padding,
  3220. but this mechanism might be required to keep some intervening communication
  3221. equipment happy.
  3222.  
  3223. @q<START-OF-PACKET >@i<number>@\If the remote Kermit will be marking the
  3224. beginning of packets with a control character other than Control-A, use this
  3225. command to tell Kermit-MS about it (the number should be the decimal ASCII
  3226. value of a control character).  This will be necessary only if the hosts or
  3227. communication equipment involved cannot pass a Control-A through as data,
  3228. or if some piece of communication equipment is echoing packets back at you.
  3229.  
  3230. @q<TIMEOUT >@i<number>@\Ask the remote Kermit to time out and retransmit after
  3231. the given number of seconds if a packet expected from Kermit-MS has not
  3232. arrived.  Use this command to change the other Kermit's normal timeout
  3233. interval.
  3234. @End(Description)
  3235.  
  3236. @Subheading[SET REMOTE]
  3237. Syntax: @q(SET REMOTE {ON, OFF})
  3238.  
  3239. SET REMOTE ON removes the file transfer display (as if you had given the
  3240. command SET DISPLAY QUIET).  It should be used when you are running Kermit-MS
  3241. in remote mode when coming in from another PC through the Kermit-MS's
  3242. "back port", to which the console has been reassigned using the DOS
  3243. CTTY@index<CTTY> command, e.g.
  3244. @example<CTTY COM1>
  3245. It is necessary to issue the SET REMOTE ON command because (a) Kermit-MS has
  3246. no way of knowing that its console has been redirected, and (b) when the
  3247. console is the same as the port, the file transfer display will interfere with
  3248. the file transfer itself.  SET REMOTE OFF returns the file transfer display
  3249. to its preferred style (REGULAR or SERIAL).  When you SET REMOTE ON, you
  3250. might also want to SET DELAY 5 or thereabouts, to allow yourself time to
  3251. escape back to the local system before MS-Kermit starts sending packets.
  3252.  
  3253. On the IBM PC, CTTY CON returns control to the normal keyboard and screen
  3254. (other systems may use other device names, e.g. SCRN).  See section
  3255. @ref<-msctty> for further details about remote operation.
  3256.  
  3257. If you are using a port other than COM1 on the remote MS-Kermit, you must
  3258. give it an appropriate SET PORT command.
  3259.  
  3260. @i<WARNING>: During CTTY console redirection, many programs still output to the
  3261. real screen and require input from the real keyboard and will hang the system
  3262. until keyboard requests are satisfied.
  3263.  
  3264. @Subheading[SET RETRY]
  3265. Syntax: @q(SET RETRY @i[number])
  3266.  
  3267. Sets the number of times a packet is retransmitted before the protocol gives
  3268. up.  The number of retries can be between 1 and 63, and is 5 by default.  This
  3269. is an especially useful parameter when the communications line is noisy or the
  3270. remote host is very busy.  The initial packet of a file exchange is given three
  3271. times as many retries to allow both systems to become ready.
  3272.  
  3273. @Subheading[SET SEND]
  3274. Syntax: @q(SET SEND @i[parameter] @i[value])
  3275.  
  3276. The SET SEND command is used primarily to override negotiated protocol options,
  3277. or to establish them before they are negotiated.
  3278. @Begin(Description,leftmargin +8,indent -8,group,blanklines hinge)
  3279. @q<END-OF-LINE >@i<number>@\ASCII value of packet terminator to put on outbound
  3280. packets.  Normally carriage return.  Use this command if the other Kermit needs
  3281. its packets terminated with a nonstandard control character.
  3282.  
  3283. @q<PACKET-LENGTH >@i<number>@\Use this as the maximum length for outbound
  3284. packets, regardless of what the other Kermit asks for.  Normally,
  3285. you would use this command only to send shorter packets than the other Kermit
  3286. requests, because you know something the other Kermit doesn't know, e.g.
  3287. there's a device on the communication path with small buffers.
  3288.  
  3289. @q<PADCHAR >@i<number>@\Use the specified control character for interpacket
  3290. padding.  Some hosts may require some padding characters (normally NUL or DEL)
  3291. before a packet, and certain front ends or other communication equipment may
  3292. need certain control characters to put them in the right modes.  The number is
  3293. the ASCII decimal value of the padding character, (0 - 31, or 127).
  3294.  
  3295. @q<PADDING >@i<number>@\How many copies of the pad character to send before
  3296. each packet, normally zero.
  3297.  
  3298. @q<PAUSE >@i<number>@\How many milliseconds to pause before sending each
  3299. packet, 0-127, normally zero.  This may help half-duplex or slow systems
  3300. prepare for reception of our packet.  Padding characters are sent only after
  3301. the time limit expires.
  3302.  
  3303. @q<QUOTE >@i<number>@\Use the indicated printable character for prefixing
  3304. (quoting) control characters and other prefix characters.  The only reason to
  3305. change this would be for sending a very long file that contains very many
  3306. @qq(#) characters (the normal control prefix) as data.
  3307.  
  3308. @q<START-OF-PACKET >@i<number>@\Mark the beginning of outbound packets with
  3309. some control character other than Control-A.  This will be necessary if the
  3310. remote host or the communication channel cannot accept a Control-A as data, or
  3311. if it echoes back your packets.  The remote host must have been given the
  3312. corresponding SET RECEIVE START-@|OF-@|PACKET command.
  3313.  
  3314. @q<TIMEOUT >@i<number>@\Change Kermit-MS's normal timeout interval; this
  3315. command is effective only if TIMER is set to be ON; it is normally ON, with a
  3316. default interval of 13 seconds.
  3317. @End(Description)
  3318.  
  3319. @Subheading[SET SERVER]
  3320. Syntax: @q<SET SERVER TIMEOUT @i{seconds}>
  3321.  
  3322. Specify how often the MS-DOS Kermit server should send NAK packets while
  3323. waiting for commands.  These NAK packets are used to recover from deadlocks
  3324. that might occur when the other Kermit sends an initial packet which is lost,
  3325. but does not have the capability to time out and retransmit it.  These NAKs
  3326. can be supressed entirely by specifying a value of zero.  This may be
  3327. necessary to avoid interfering with certain modems or PBXs that go into
  3328. originate mode when they receive input from the PC, when in fact you want the
  3329. device to be in answer mode.
  3330.  
  3331. @Subheading[SET SPEED]
  3332. Syntax: @q<SET SPEED @i{rate}>
  3333.  
  3334. @Index<Baud Rate>@Index<Speed> Set the transmission speed (in bits per second,
  3335. commonly called @i<baud>) of the currently selected terminal communications
  3336. port to 300, 1200, 1800, 2400, 4800, 9600, or other common speed, and on the
  3337. IBM PC family, higher speeds including 19200, 38400, 57600, and 115200.  Both
  3338. connected systems, as well as any intervening communication equipment, must be
  3339. able to support the specified transmission speed, and both systems should be
  3340. set to the same speed.
  3341.  
  3342. Some implementations do not support the SET SPEED command.  But Kermit-MS
  3343. leaves the current communication port settings alone unless you issue explicit
  3344. SET commands to change them, so you may use MODE or other DOS programs to
  3345. establish the desired settings before running Kermit.
  3346.  
  3347. On certain systems, when you first run Kermit after powering the system up, you
  3348. may get a message "Unrecognized baud rate".  This means that Kermit tried to
  3349. read the baud rate from the port and none was set.  Simply use SET SPEED (if
  3350. available) or the DOS MODE command to set the desired baud rate.
  3351.  
  3352. SET BAUD is a synonym for SET SPEED.
  3353.  
  3354. @Subheading<SET TAKE-ECHO>
  3355. @Index(Command Files)
  3356. Syntax: @q<SET TAKE-ECHO {ON, OFF}>
  3357.  
  3358. Specifies whether screen display should occur during implicit or explicit TAKE
  3359. operations on @q(MSKERMIT.INI)@index(MSKERMIT.INI) or other Kermit-MS command
  3360. files, and during evaluation of macro definitions by the DO command.  Handy for
  3361. finding errors in TAKE files or macro definitions.
  3362.  
  3363. @Subheading(SET TERMINAL)
  3364. @Index[Terminal Settings]@Index[SET TERMINAL]
  3365. Syntax: @q(SET TERMINAL {@i<type>, @i<parameter> [@i<value>]})
  3366.  
  3367. This command controls most aspects of terminal emulation.  Most of the
  3368. parameters are only settable (or meaningful) on the IBM PC family and
  3369. compatibles.  (Programmers who are proficient on other MS-DOS systems are
  3370. invited to fill in these functions for those systems and send the results
  3371. back to Columbia.)  On other systems, built-in setup modes or DOS commands can
  3372. be used to accomplish the same functions.
  3373.  
  3374. The first group of parameters tells which kind of terminal to emulate.  When
  3375. Kermit-MS uses its built-in software for emulation, incoming characters are
  3376. examined for screen control commands (escape sequences) specific to that
  3377. terminal, and if encountered, the commands are executed on the PC screen.
  3378. @Begin(Description,leftmargin +8,indent -8)
  3379. @q<NONE>@\Act as a dumb terminal.  All incoming characters will be sent to the
  3380. screen "bare", as-is, through DOS.  If you have loaded a device driver into DOS
  3381. for the @q<CON> device, such as @q<ANSI.SYS>@index(ANSI.SYS), then that driver
  3382. will be able to interpret the codes itself.  Many non-IBM systems have their
  3383. own screen control code interpreter built into DOS or firmware, or available as
  3384. a loadable device driver.
  3385.  
  3386. @q<VT52>@\The DEC VT-52 terminal.
  3387.  
  3388. @q<HEATH>@\The Heath/Zenith-19 terminal (H19), which supports all the VT52
  3389. commands, plus line and character insert/delete editing functions, an ANSI
  3390. mode, and a 25th line.
  3391.  
  3392. @q<VT102>@index<VT102 Emulation>@\The DEC VT102 (ANSI) terminal, which is the
  3393. same as the VT100 but also supports line/character insert/delete editing
  3394. functions and ANSI printer controls.
  3395.  
  3396. @q<TEK4010>@\A Tektronix 4010 graphics terminal@index<Tektronix>.  Currently
  3397. only available on IBM, TI, and Victor PCs.  On the IBM family, Kermit
  3398. automatically senses and adapts to the CGA, EGA, Monochrome, Hercules, or ATT
  3399. style board.
  3400. @end<description>
  3401. On the IBM family, you may "toggle" among the supported terminal emulations by
  3402. typing Alt-Minus.
  3403.  
  3404. The specific escape sequences supported by Kermit for each of these terminal
  3405. types are listed in section @ref(-termcodes).  Note that when a Kermit program
  3406. includes Tektronix emulation, this can be invoked automatically while in
  3407. character mode (VT102, VT52, or Heath emulation) when the emulator receives
  3408. certain escape sequences.  This can be turned off using the DISABLE TEK
  3409. command.
  3410.  
  3411. The remaining SET TERMINAL commands specify setup options for the selected
  3412. terminal:
  3413. @begin(description,leftmargin +8,indent -8, group, blanklines hinge)
  3414. @q<CHARACTER-SET {UK, US, ALTERNATE-ROM}>@\UK displays @qq<#> (ASCII 35,
  3415. number sign) as a pound sterling sign, US displays @qq<#> as @qq<#>.
  3416. ALTERNATE-ROM maps accent grave and the lowercase letters to be national
  3417. characters in the IBM video adapter.  That is, character codes of 60h to 7Ah
  3418. (accent grave, lower case a-z) are mapped to codes 80h to 9Ah.  The SET
  3419. TERMINAL CHARACTER-SET command applies only during VT100/102 emulation.
  3420.  
  3421. @q<CLEAR-SCREEN>@\Clears the screen, so that a subsequent CONNECT command
  3422. shows a blank screen.  The action taken is identical to Kermit's @q<\Kreset>
  3423. verb.
  3424.  
  3425. @begin<multiple>
  3426. @q<COLOR @i<number> [, @i<number> [, @i<number>]]>@\Several numbers, applied in
  3427. left to right sequence, separated by commas or spaces:
  3428. @begin<description,leftmargin +6,indent -4,spread 0,above 0.5,below 0.5>
  3429. 0@\Reset the colors to normal intensity white characters on a black
  3430. background and use the "no-snow" mode on the IBM Color Graphics
  3431. Adapter (CGA).
  3432.  
  3433. 1@\High intensity foreground
  3434.  
  3435. 10@\Request fast screen updating for use on the IBM Mono, EGA, or VGA (usually
  3436. sensed and set internally by Kermit), and some non-IBM CGAs.
  3437.  
  3438. 3@i<x>@\Foreground color
  3439.  
  3440. 4@i<x>@\Background color
  3441. @end<description>
  3442. where @i<x> is a single digit from 0 to 7, which is the sum of the
  3443. desired colors:
  3444. @begin<description,leftmargin +6,indent -4,spread 0>
  3445. 1@\Red
  3446.  
  3447. 2@\Green
  3448.  
  3449. 4@\Blue
  3450. @end<description>
  3451. Example: "SET TERMINAL COLOR 0 1 37 44" on an IBM CGA would produce bold white
  3452. characters on a blue field with no snow.  The snow removal business has to do
  3453. with whether the program should synchronize with vertical retrace when updating
  3454. screen memory.  This is necessary with certain color adaptors (like the CGA)
  3455. and unnecessary for others (like the EGA).
  3456. @end<multiple>
  3457.  
  3458. @q<CURSOR-STYLE {BLOCK, UNDERLINE}>@\Sets the cursor rendition to
  3459. your preference.  Note that on some early IBM PCs and compatibles, the cursor
  3460. may not be restored correctly after escaping back from CONNECT because of a
  3461. bug in the early IBM BIOS.
  3462.  
  3463. @q<DIRECTION {LEFT-TO-RIGHT, RIGHT-TO-LEFT}>@\Controls the direction of
  3464. screen display during CONNECT.  You may use Right-to-Left for Hebrew or Arabic,
  3465. provided you have the appropriate character sets loaded.
  3466.  
  3467. @q<KEYCLICK {ON, OFF}>@\Turns electronic keyclick ON or OFF.  If
  3468. your keyboard has a mechanical clicker (as IBM boards do), you may not notice
  3469. the effect of this command.
  3470.  
  3471. @q<GRAPHICS {AUTO-SENSING, CGA, EGA, VGA, HERCULES, ATT}>@\Manually selects
  3472. the kind of display adapter for Tektronix graphics.  AUTO-SENSING is the
  3473. default, VGA means 640x480x16 colors, and ATT encompasses the ATT 6300 series,
  3474. Olivetti M24/M28, DEC VAXmate II, and the Toshiba T3100 in 640x400 b/w (see
  3475. Table @ref<-mstekda>).
  3476.  
  3477. @q<MARGIN-BELL {ON, OFF}>@\Controls whether the bell should be
  3478. sounded when the cursor passes column 72 near the right screen margin; wider
  3479. displays set the bell 8 columns from the right edge.
  3480.  
  3481. @q<NEWLINE-MODE {ON, OFF}>@\ON sends a carriage-return-linefeed
  3482. combination (CRLF) when you type carriage return (CR) during terminal
  3483. emulation.  OFF (default) just sends a CR when you type CR.  Useful in
  3484. conjunction with SET LOCAL-ECHO ON when CONNECTing two PC's back-to-back.
  3485.  
  3486. @q<ROLL {ON, OFF}>@\ON unrolls the screen to the bottom before adding new
  3487. material if the screen had been rolled back, e.g. by Ctrl-PgUp.  ROLL OFF (the
  3488. default) displays new material on the current screen, possibly overwriting old
  3489. material.
  3490.  
  3491. @q<SCREEN-BACKGROUND {NORMAL, REVERSE}>@\NORMAL means dark
  3492. background, light characters.  REVERSE means light background, dark characters.
  3493.  
  3494. @q(TAB {AT @i<n>, CLEAR AT @i<n>, CLEAR ALL})@\Sets tab stops@index<Tab Stops>
  3495. or clears one or all tab stops; @i<n> is the numeric position of the tab to be
  3496. set or cleared.  By default, tabs are every 8 spaces, at positions 9, 17, 25,
  3497. etc.  Only meaningful when emulating a terminal that has settable tabs (the
  3498. VT52 doesn't really but the emulator can set them anyway).  More than one
  3499. tabstop may be specified by separating column numbers with commas, spaces, or
  3500. tabs.  You may also use the notation "@i<m>@q<:>@i<n>" to specify regularly
  3501. spaced tabs across the screen, where @i<m> is the initial tab position, and
  3502. @i<n> is the spacing between tabs.  132 columns are supported.
  3503.  
  3504. @q<WRAP {ON, OFF}>@\ ON automatically breaks screen lines (by inserting a CRLF)
  3505. when they reach the right margin.  OFF disables wrapping -- if a line is
  3506. too long, the excess characters go off the screen.  WRAP is OFF by default,
  3507. since most hosts format lines to fit on your screen.
  3508. @end<description>
  3509.  
  3510. @Subheading(SET TIMER)
  3511. @Index[Timeout]
  3512. Syntax: @q(SET TIMER {ON, OFF})
  3513.  
  3514. This command enables or disables the timer that is used during file transfer to
  3515. break deadlocks that occur when expected packets do not arrive.  By default,
  3516. the timer is ON.  If the other Kermit is providing timeouts, you can safely
  3517. turn the timer OFF to avoid unnecessary retransmissions that occur when two
  3518. timers go off simultaneously.
  3519.  
  3520. @Subheading<SET TRANSLATION>
  3521. @Index<TRANSLATION>
  3522. Syntax: @q<SET TRANSLATION INPUT {ON, OFF, @i<char1> @i<char2>}>
  3523.  
  3524. This command provides multi-language support (and perhaps other special
  3525. effects) during CONNECT, and during execution of the INPUT, OUTPUT, PAUSE, and
  3526. TRANSMIT script commands, but not during file transfer or at MS-Kermit command
  3527. level.  A character that arrives at the communication port (@i<char1>) will be
  3528. translated to another character (@i<char2>) before display on the screen.  As
  3529. many as 256 characters may have translations specified concurrently.  But to
  3530. see characters with ASCII values higher than 127, you must also SET DISPLAY 8
  3531. and SET PARITY NONE.
  3532.  
  3533. SET TRANSLATION INPUT ON enables translation (the keyword INPUT is required to
  3534. allow future translation mechanisms).  OFF disables the translation and is the
  3535. default.  So even if you have set up a translation table, you must SET
  3536. TRANSLATION INPUT ON before it will take effect.  SHOW TRANSLATION tells
  3537. whether translation is OFF or ON, and displays any current table entries.
  3538.  
  3539. Translation table entries are made by specifying byte pairs in ASCII or
  3540. numeric backslash form:
  3541.  @Example(SET TRANS INPUT @q<\3> @q<\13>)
  3542.  converts incoming ASCII ETX characters (decimal 3) to ASCII CR (decimal 13).
  3543. 8-bit values are allowed, and refer to characters in the "upper half" of the
  3544. PC's character set, either the ROM characters supplied with the PC or else
  3545. substitutions provided by a special device driver.
  3546.  
  3547. @index<German>
  3548. A more practical example shows how the user of a German PC could use the SET
  3549. TRANSLATION and SET KEY commands to make the PC's umlaut-a key (key code 132)
  3550. send a left curly brace (@qq({), ASCII 123), and to display incoming curly
  3551. braces as umlaut-a's:
  3552. @begin<example>
  3553. SET KEY \d132 \d123
  3554. SET TRANS INP { \d132
  3555. @end<example>
  3556. (This example applies to the IBM PC German keyboard, and assumes the German
  3557. keyboard driver, KEYBGR, has been loaded.  This is usually done in
  3558. @q<AUTOEXEC.BAT>.)
  3559.  
  3560. @Subheading<SET WARNING>
  3561. @Index<File Warning>@index(Warning)
  3562. Syntax: @q<SET WARNING {ON, OFF}>
  3563.  
  3564. Specify what to do when an incoming file is about to be stored under the same
  3565. name as an existing file in the target device and directory.  If ON, Kermit
  3566. will warn you when an incoming file has the same name as an existing file, and
  3567. automatically rename the incoming file (as indicated in the warning message) so
  3568. as not to destroy (overwrite) any existing one.  If OFF, the pre-@|existing
  3569. file is destroyed, even if the incoming file does not arrive completely.
  3570. WARNING is ON by default as a safety measure, and the current setting may be
  3571. observed in the SHOW FILE display.
  3572.  
  3573. The new name is formed by adding numbers to the part of the name before the
  3574. dot.  For instance, @q<ABC.TXT> becomes @q<ABC00001.TXT>, @q<ABC00001.TXT>
  3575. becomes @q<ABC00002.TXT>, etc.  If the name already has eight characters, then
  3576. digits replace the rightmost characters.
  3577.  
  3578. @subsection[The STATUS and SHOW Commands]
  3579. The values of MS-Kermit options that can be SET, DEFINEd, ENABLEd, or DISABLEd
  3580. can be displayed using the STATUS or SHOW commands.
  3581.  
  3582. @subheading[The STATUS Command]
  3583. Syntax: @q(STATUS)
  3584.  
  3585. The STATUS command displays the values of the current SET options on a single
  3586. screen.  There are no operands for the STATUS command.  Use the SHOW command
  3587. to see logically-grouped settings, e.g. SHOW COMMUNICATIONS, SHOW TERMINAL.
  3588.  
  3589. @subheading[The SHOW Command]
  3590. Syntax: @q(SHOW )@i(option)
  3591.  
  3592. The SHOW command is used for displaying communication parameters, protocol
  3593. settings, macro definitions, key redefinitions, file transfer statistics,
  3594. translations, and other common groupings.
  3595. @begin(description,leftmargin +8, indent -8,group,blanklines hinge)
  3596. @q(SHOW COMMUNICATIONS)@\displays the settings of the current serial port
  3597. (port, speed, parity, echo, etc) and the status of modem signals Carrier
  3598. Detect, Data Set (modem) Ready, and Clear To Send.
  3599.  
  3600. @q(SHOW FILE)@\displays the file transfer control settings, such as the
  3601. current path, file discard, attributes packets on/off, warning, end-of-file
  3602. convention, etc.
  3603.  
  3604. @q(SHOW KEY)@\allows you to determine a key's identification code and
  3605. what it will send in CONNECT mode, most useful for obtaining the identification
  3606. of a key when SET KEY commands will be placed in a TAKE file.  This command can
  3607. be done only interactively (use a @q<?> to see all defined keys).  Refer to the
  3608. SET KEY description for details.
  3609.  
  3610. @q(SHOW LOGGING)@\Displays the names of the session, packet, and transaction
  3611. logs, and tells whether logging is in effect.
  3612.  
  3613. @q(SHOW MACROS [macroname])@\displays the definitions of all currently defined
  3614. macros, as well as the amount of space left for new macro definitions. A
  3615. macro name, or abbreviation, can be included to restrict the list, e.g. SHOW
  3616. MACRO IBM will display the definition of the IBM macro, and SHOW MACRO X will
  3617. list the definitions of all macros whose names begin with X.
  3618.  
  3619. @index<Modem>
  3620. @q(SHOW MODEM)@\displays the status of the modem signals DSR (dataset ready,
  3621. modem tells the PC that it is turned on and in data mode), CTS (clear to send,
  3622. modem grants the PC permission to send data), and CD (carrier detect, local
  3623. modem tells the PC that it is connected to the remote modem).  The results may
  3624. be misleading if your asynchronous adapter, or the connector or cable that is
  3625. attached to it, is strapped to supply these modem signals itself.
  3626.  
  3627. @q(SHOW PROTOCOL)@\displays the values of the Kermit protocol-related
  3628. parameters, including all the SET SEND and SET RECEIVE parameters, plus whether
  3629. the timer, attribute packets, and logging are enabled.
  3630.  
  3631. @q(SHOW SCRIPTS)@\displays the script-related variables.
  3632.  
  3633. @q(SHOW SERVER)@\displays which server functions are enabled and disabled.
  3634.  
  3635. @q(SHOW STATISTICS)@\displays counts of characters sent and received
  3636. during file transfers, for both the most recent transfer and the entire
  3637. session, and an estimate of the average baud rate while sending and listening.
  3638.  
  3639. @q(SHOW TERMINAL)@\displays the terminal settings, which terminal is being
  3640. emulated, the tab stops, etc.
  3641.  
  3642. @q(SHOW TRANSLATION)@\displays the entries in the 256 byte input translation
  3643. table.  Values are expressed numerically to avoid confusion with different
  3644. display adapters, and the command shows only entries for which input and output
  3645. codes differ.
  3646. @end(description)
  3647.  
  3648. @section<Macros>
  3649. @label<-msmacros>
  3650.  
  3651. Like TAKE files, macros provide a way of collecting many commands into a single
  3652. command.  The difference between a macro and a TAKE file is that Kermit keeps
  3653. all its macro definitions in memory, and can execute them as many times as you
  3654. like, without having to look them up on disk, whereas every time you issue a
  3655. TAKE command, Kermit has to access a disk.  But@value<ellips> you can have as
  3656. many TAKE command files as you like, and they can be as long as you want,
  3657. whereas MS-Kermit's memory for storing macro definitions is limited.  You can
  3658. put macro definitions and DO commands for them in TAKE files, or for that
  3659. matter, you can put TAKE commands in macro definitions.  There is a limit
  3660. of 25 simultaneously active TAKE files plus active macros; a TAKE file or
  3661. macro remains active if the last item invokes another TAKE or macro command.
  3662. Active here means Kermit is reading commands from them, not just storing
  3663. them for later.
  3664.  
  3665. @subheading<The DEFINE Command>
  3666. @index[DEFINE]@index[Macro]@index[Command Macro]
  3667. Syntax: @q(DEFINE @i[macro-name] [@i(command) [, @i(command) [, ...]]])
  3668.  
  3669. Kermit-MS command macros are constructed with the DEFINE command.
  3670. Any Kermit-MS commands may be included.  Example:
  3671. @begin(example)
  3672. define telenet set parity mark, set speed 1200, connect
  3673. @end(example)
  3674. A macro can be undefined by typing an empty DEFINE command for it, like
  3675. @example(define telenet)
  3676. A macro definition may be up to 255 character long.  This example shows
  3677. a long definition in which lines are continued with hyphenation:
  3678. @begin<example>
  3679. define setup set port 1, set speed 19200, set parity even,-
  3680. set flow none, set handshake xon, set local-echo on,-
  3681. set timer on, set terminal color 1 31 45,-
  3682. set warning on, set incomplete keep, connect
  3683. @end<example>
  3684. Longer definitions can be accomplished by "chaining."  Example:
  3685. @begin<example>
  3686. define setup set port 1, set speed 19200, set par even, do setup2
  3687. define setup2 set flo no, set handsh xon, set local on, do setup3
  3688. define setup3 set timer on, set terminal color 1 31 45, do setup4
  3689. define setup4 set warning on, set incomplete keep, connect
  3690. @end<example>
  3691.  
  3692. DO SETUP or just SETUP will invoke all of these commands.  Commas are
  3693. used to separate commands in macro definitions; carriage returns (@q<\13>)
  3694. cannot be used.  When control or other special characters are needed in a
  3695. macro they may be expressed in backslash number form, @q<\>@i<nnn>.
  3696.  
  3697. The SHOW MACROS command displays the values of currently defined macros, and
  3698. tells how much space is left for further definitions.
  3699.  
  3700. The definition of the macro is entered literally; variables are not evaluated
  3701. (see ASSIGN, below).
  3702.  
  3703. @Subheading<The DO Command>
  3704. @index[DO Command]
  3705. Syntax: @q([DO] @i[macro-name] [@i<parameters...>])
  3706.  
  3707. A Kermit-MS macro is invoked using the DO command.  For instance, Kermit-MS
  3708. comes with a predefined macro to allow convenient setup for IBM mainframe
  3709. line-mode communications; to invoke it, you would type DO IBM.  The IBM macro
  3710. is defined as "set timer on, set local-echo on, set parity mark, handshake xon,
  3711. set flow none".  You can use the DEFINE command to redefine this macro or
  3712. remove the definition altogether.
  3713.  
  3714. There is no automatic way to undo the effect of a macro.  If you need to
  3715. accomplish this effect, you should define another macro for that purpose.  For
  3716. instance, to undo the effect of "do ibm" so that you could connect to, say, a
  3717. DEC VAX, you could:
  3718. @begin(example,leftmargin +2)
  3719. def vax set parity none, set handshake none, set flow xon/xoff,-
  3720. set timer off, set local-echo off
  3721. @end(example)
  3722. Then you can "do ibm" whenever you want to use the IBM system, and "do vax"
  3723. whenever you want to use the VAX.
  3724.  
  3725. If you wish to view the macro expansion whenever you issue a DO command,
  3726. you can SET TAKE-ECHO ON.
  3727.  
  3728. As a convenience the word DO may be omitted.  However, when question-mark help
  3729. is sought at the Kermit prompt, only the main keyword help table will be shown.
  3730. If you want to see the available macros, type "do ?" or SHOW MACROS.  Use of DO
  3731. is recommended for overall clarity unless a favorite macro is executed
  3732. frequently.
  3733.  
  3734. @Subheading<Variables>
  3735. @index[Variables, substitution]
  3736.  
  3737. Macros can use substitution variables similar to those of DOS Batch.  The name
  3738. of a substitution variable is of the form "@q<\%>@i<character>", where the
  3739. single character is a digit or a letter or other 8-bit character whose ASCII
  3740. value is 48 decimal or larger; upper and lower case letters are considered to
  3741. be the same character.  A substitution variable is defined as a string of text
  3742. by the DEFINE command (the variables are in fact macros) and Kermit replaces
  3743. occurrences of the variable name with that text, hence the word
  3744. "substitution".  For example,
  3745. @begin<example>
  3746. Kermit-MS>@ux<define \%a this is substituted material>
  3747. Kermit-MS>@ux<echo I wonder if \%a or not.>
  3748. @end<example>
  3749. yields the display:
  3750. @begin<example>
  3751. I wonder if this is substituted material or not.
  3752. @end<example>
  3753. Another example:
  3754. @begin<example>
  3755. Kermit-MS>@ux<define \%c set port 1,set speed 9600,set parity even,connect>
  3756. @end<example>
  3757. Then
  3758. @begin<example>
  3759. Kermit-MS>@ux(\%c)
  3760. @end<example>
  3761. is equivalent to
  3762. @begin<example>
  3763. Kermit-MS>@ux(set port com1)
  3764. Kermit-MS>@ux(set speed 9600)
  3765. Kermit-MS>@ux(set parity even)
  3766. Kermit-MS>@ux(connect)
  3767. @end<example>
  3768. The special subset of substitution variables, @q(\%1 .. \%9), is similar to
  3769. the DOS Batch variable set @q(%1 .. %9).  The DO command can accept arguments
  3770. after the macro name and the individual words in the arguments become the
  3771. definitions of @q(\%1), etc, for up to nine words, in order.
  3772. For example, given the following definition@index<DIAL Command>:
  3773. @begin<example>
  3774. def dial ATDT\%1\13,input 30 CONNECT,connect,in Login:,out \%2\13
  3775. @end<example>
  3776. the following command can be used to dial any phone number:
  3777. @begin<example>
  3778. Kermit-MS>@ux<do dial 555-1212 myname>
  3779. @end<example>
  3780. The word DO may be omitted, as in:
  3781. @begin<example>
  3782. Kermit-MS>@ux(dial 555-1212 myname)
  3783. @end<example>
  3784. This command automatically assigns the value "555-1212" to variable the @q(\%1)
  3785. and "myname" to @q(\%2), and uses these values while dialing the phone and
  3786. logging into the host system.  If fewer than nine words are seen the remaining
  3787. variables are not changed.  For example, if the line above was busy, you could
  3788. dial a different number and omit the username because it will be remembered
  3789. from last time.
  3790.  
  3791. If it is desired to assign multiple words to a single variable, they can be
  3792. grouped in braces, for example
  3793. @begin<example>
  3794. Kermit-MS>@ux<dial {212 555 1212} myname>
  3795. @end<example>
  3796.  
  3797. Substitution variables can reference other substitution variables in their
  3798. definitions.  Care is needed to prevent circular definitions, but even those
  3799. are detected by Kermit.  Subtle circular executions could cause Kermit to go
  3800. into an endless loop; if you think this is happening, type a Control-C to
  3801. interrupt the process.  To clarify matters, the definition string of a variable
  3802. is substituted for the variable's name when the name is observed in a left to
  3803. right scan of a command.  For example,
  3804. @begin<example>
  3805. Kermit-MS>@ux(define \%a echo This is \%b example: \%b.)
  3806. Kermit-MS>@ux(define \%b a mac\%c expansion)
  3807. Kermit-MS>@ux(define \%c ro string)
  3808. Kermit-MS>@ux(\%a)
  3809. @end<example>
  3810. displays:
  3811. @begin<example>
  3812. This is a macro string expansion example: a macro string expansion.
  3813. @end<example>
  3814. If this example is entered manually then when the final @q(\%a) is typed the
  3815. command line is immediately replaced with the fully expanded command and
  3816. more input is solicited (such as a carriage return).  Try it.  Check the
  3817. variable definitions with the SHOW MACRO command.
  3818.  
  3819. A variable can be undefined (deleted) by defining it as an empty string:
  3820. @begin<example>
  3821. Kermit-MS>@ux(define \%c)
  3822. @end<example>
  3823.  
  3824. DOS batch file arguments may be transformed into Kermit variables.
  3825. Suppose file @q<TEST.BAT> holds the line:
  3826. @example<Kermit define \%%1 %1, define \%%a %2, stay>
  3827. Invoking the Batch file by:
  3828. @example(C>@ux[test one two])
  3829. results in creating Kermit variables @q<\%1> with definition of "one" and
  3830. @q<\%a> with definition "two". The doubled percent symbols in the Batch file
  3831. are needed to compensate for one of them being consumed by the DOS Batch
  3832. processor.  @q<%1> is the first Batch argument word, @q<%2> is the second
  3833. word.  The syntax @q<\%%1> is converted by Batch to be @q<\%1> when seen by
  3834. Kermit, without further substitution by Batch.
  3835.  
  3836. @subheading<The ASSIGN Command>
  3837. @index<ASSIGN>
  3838. Syntax: @q<ASSIGN>
  3839.  
  3840. The DEFINE command does not evaluate the definition.  For instance, the command
  3841. @example<define \%a \%1>
  3842. simply defines the variable @q<\%a> to be @qq<\%1>, not the current @i<value>
  3843. of @q<\%1> -- if @q<\%1> changes, then so does @q<\%a>.  To copy the @i<value>
  3844. of one variable to another, use the ASSIGN command:
  3845. @example<assign \%a \%1>
  3846. This copies the value of @q<\%1> to @q<\%a>, so that if @q<\%1> changes,
  3847. @q<\%a> will retain the previous value.  Example:
  3848. @begin<example>
  3849. Kermit-MS>@ux<define \%a foo>
  3850. Kermit-MS>@ux<define \%b \%a>
  3851. Kermit-MS>@ux<echo \%a \%b>
  3852. foo foo
  3853. Kermit-MS>@ux<assign \%c \%a>
  3854. Kermit-MS>@ux<define \%a new>
  3855. Kermit-MS>@ux<echo \%a \%b>
  3856. new new
  3857. Kermit-MS>@ux<echo \%a \%c>
  3858. new foo
  3859. @end<example>
  3860.  
  3861. @section<SCRIPTS>
  3862. @label<-msscp>
  3863. @index<Script Files>
  3864.  
  3865. A script is a file or a macro containing Kermit commands to be executed.  What
  3866. distinguishes a script from ordinary TAKE files or macros is the presence of
  3867. INPUT, REINPUT, OUTPUT, PAUSE, ECHO, ASK, CLEAR, IF, GOTO, and WAIT commands
  3868. to automatically detect and respond to information flowing though the serial
  3869. port, actions which otherwise would be performed by the user during CONNECT.
  3870. The login sequence of a host computer is a classical example.
  3871.  
  3872. It is a common, but incorrect, assumption that text to be sent to the remote
  3873. computer can be included in a TAKE file after the CONNECT command:
  3874. @begin<example>
  3875. set speed 9600        ; MS-Kermit command
  3876. connect               ; MS-Kermit command
  3877. run kermit            ; Text to be sent to other system
  3878. send foo.bar          ; Text to be sent to other system
  3879. ^]c                   ; Escape sequence to get back to MS-Kermit
  3880. receive               ; MS-Kermit command
  3881. @end<example>
  3882. The reason this doesn't work is that during CONNECT, MS-Kermit always reads
  3883. from the real keyboard, and not from the take file.  Even if this technique did
  3884. work, it would still run into synchronization problems.  But these can be
  3885. avoided when there is a way to coordinate the commands that we send with the
  3886. remote system's responses.  Kermit's script commands provide this ability.
  3887. They may be freely intermixed in a TAKE file or macro with any other Kermit
  3888. commands to achieve any desired effect.  The OUTPUT command sends the specified
  3889. characters as if the user had typed them; the INPUT command reads the responses
  3890. and compares them with specified character strings, just as the user would do.
  3891.  
  3892. The script commands include INPUT, REINPUT, OUTPUT, PAUSE, WAIT, ECHO, IF,
  3893. ASK, and GOTO.  These commands may be interrupted by typing Ctrl-C at the
  3894. keyboard.  The INPUT, REINPUT, PAUSE, and WAIT commands accept a following
  3895. number as a timeout value. The number is interpreted as seconds from the
  3896. present or, if given in @q<hh:mm:ss> form, as a specific time of day.  In
  3897. either case, the timeout interval must be within 12 hours of the present to
  3898. avoid it being considered as in the past (expired).
  3899.  
  3900. @i<HINT:>  It is recommended that a console driver such as @q<ANSI.SYS> be
  3901. loaded during executing of a script.  This is because Kermit's terminal
  3902. emulator is active only during the CONNECT command, and any PC/host
  3903. interactions that occur during script execution may appear fractured on the
  3904. screen.  This is particularly true of full-screen login applications, like
  3905. through an IBM 3270 protocol converter.
  3906.  
  3907. @subheading<The CLEAR Command>
  3908. Syntax: @q<CLEAR>
  3909.  
  3910. The CLEAR command empties the buffers of the serial port to forget any earlier
  3911. material.  This gets the INPUT command off to a clean start.  (This command was
  3912. called CLRINP in 2.29B and earlier, and CLEAR was used to erase macro and key
  3913. definition memory).
  3914.  
  3915. @subheading<The ECHO Command>
  3916. Syntax: @q<ECHO >@i<text>
  3917.  
  3918. The ECHO command is useful for reporting progress of a script, or prompting the
  3919. user for interactive input.  The text is displayed on the screen, and may
  3920. include backslash notation for control or 8-bit characters.  An implied
  3921. linefeed is included at the beginning of the text.
  3922.  
  3923. @Subheading<SET INPUT>
  3924. @Index<INPUT Command>
  3925. Syntax: @q<SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}>
  3926.  
  3927. The SET INPUT command controls the behavior of the script INPUT command:
  3928. @begin(description, leftmargin +4,indent -4,group,blanklines hinge)
  3929. @q<SET INPUT CASE {IGNORE, OBSERVE}>@\
  3930. Says whether or not to distinguish upper and lower case letters when doing a
  3931. matchup in the INPUT command.  OBSERVE causes upper and lower case letters to
  3932. be distinguished.  The default is to IGNORE case distinctions.
  3933.  
  3934. @q<SET INPUT DEFAULT-TIMEOUT >@i(seconds)@\Changes the default waiting time
  3935. from one second to this new value.  The value is used when an INPUT command has
  3936. no timeout specified.
  3937.  
  3938. @q<SET INPUT ECHO {ON, OFF}>@\Show on the screen characters read from the
  3939. serial port during the script operation, or not.  Default is ON, show them.
  3940.  
  3941. @q<SET INPUT TIMEOUT-ACTION {PROCEED, QUIT}>@\Determines whether or not the
  3942. current macro or TAKE command file is to be continued or exited if a timeout
  3943. occurs.  PROCEED is the default and means that timeouts are ignored.  QUIT
  3944. causes the current script file to be exited and control passed to either the
  3945. next higher level script file (if there is one) or to Kermit's main prompt.
  3946. @end<description>
  3947. The SHOW SCRIPTS command displays the SET INPUT values.
  3948.  
  3949. @subheading<The INPUT command>
  3950. @Index<INPUT Command>
  3951. Syntax: @q<INPUT [@i<timeout>] {@i<search-string>, @@@i<filespec>}>
  3952.  
  3953. INPUT is the most powerful of the script commands.  It reads characters from
  3954. the serial port continuously until one of two things occurs: the received
  3955. characters match the search string or the time limit expires.  Matching strings
  3956. is the normal use, as in:
  3957. @begin<example>
  3958. Kermit-MS>@ux<input 5 Login please:>
  3959. @end<example>
  3960. to recognize the phrase "Login please:", or else time out after waiting for 5
  3961. seconds.  A special binary character @q<\255> or @q<\o377> or @q<\xFF> stands
  3962. for the combination carriage return and a line feed, in either order, to
  3963. simplify pattern matching.  The command reports a testable status of SUCCESS or
  3964. FAILURE and sets the DOS ERRORLEVEL parameter to 2 if it fails to match within
  3965. the timeout interval.  Characters are stored in a 128 byte buffer for later
  3966. examination by REINPUT, discussed below.
  3967.  
  3968. Beware of characters arriving with parity set because the pattern matching
  3969. considers all 8 bits of a byte unless the local parity is other than NONE and
  3970. SET DISPLAY is 7-BITS@index<Parity>.  Arriving characters are modified by first
  3971. removing the parity bit, if parity is other than NONE, then they are
  3972. passed through the SET TRANSLATION INPUT converter, the high bit is again
  3973. suppressed if SET DISPLAY is 7-BITs, the result is logged and stored for
  3974. pattern matching.
  3975.  
  3976. @subheading<The REINPUT command>
  3977. @Index<REINPUT Command>
  3978. Syntax: @q<REINPUT [@i<timeout>] {@i<search-string>, @@@i<filespec>}>
  3979.  
  3980. The REINPUT command is like INPUT except that characters are read from the 128
  3981. byte serial port history buffer rather than always seeking fresh input from the
  3982. port.  The purpose is to permit the current text to be examined several times,
  3983. looking for different match strings.  A common case is reading the results of a
  3984. connection message from a modem which might be "CONNECT 1200" or "CONNECT
  3985. 2400", depending on the other modem.  If the history buffer has less than 128
  3986. bytes then fresh input may be requested while seeking a match, until the buffer
  3987. is full.  REINPUT match searches begin at the start of the buffer whereas INPUT
  3988. searches never go back over examined characters.  REINPUT sets the testable
  3989. status of SUCCESS or FAILURE and DOS ERRORLEVEL, just as for INPUT.
  3990.  
  3991. @Index<OUTPUT Command>
  3992.  
  3993. When a script fails because an INPUT or REINPUT command did not encounter the
  3994. desired string within the timeout interval the message "?Timeout" is displayed.
  3995.  
  3996. @subheading<The OUTPUT command>
  3997. @Index<OUTPUT Command>
  3998. Syntax: @q<OUTPUT {@i<string>, @@@i<filespec>}>
  3999.  
  4000. The OUTPUT command writes the indicated character string to the serial port as
  4001. ordinary text.  The string may contain control or other special binary
  4002. characters by representing them in backslash form.  Carriage
  4003. Return @q<(CR)>, for example, is @q<\13 decimal>, @q<\o15> octal, or @q<\x0D>
  4004. hexadecimal.  The string may use 8-bit characters if the communications parity
  4005. is type NONE.  A special notation is also provided, @q<\b> or @q<\B>, which
  4006. causes a BREAK signal to be transmitted.
  4007.  
  4008. The string to be transmitted starts with the first non-@|spacing character
  4009. after the OUTPUT command and ends at either the end of line or, if executed
  4010. within a TAKE file, at a semicolon (if you need to output a semicolon from
  4011. within a TAKE file, use backslash notation, e.g. @qq<\59>).  Indirectly
  4012. obtained strings, the @q<@@>@i(filespec) form, read the first line of the file
  4013. up to but not including the explicit carriage return.
  4014.  
  4015. As a convenience, text arriving at the serial port during the OUTPUT command
  4016. is shown on the screen if SET INPUT-ECHO is ON, and stored in a 128-byte
  4017. internal buffer for rereading by subsequent (RE)INPUT commands.
  4018.  
  4019. The INPUT, REINPUT, and OUTPUT commands have a special syntax to replace the
  4020. normal string with text obtained from a file or device:
  4021.  @begin(example)
  4022. OUTPUT @@@i<filespec>
  4023. INPUT @@@i<filespec>
  4024. @end(example)
  4025.  Both forms read one line of text from the file or device and use it as the
  4026. desired string.  A common use is to wait for a password prompt and then read
  4027. the password from the console keyboard.  A string starts with the first
  4028. non-spacing character and ends at either the end of line or, if executed within
  4029. a TAKE file, at a semicolon.  Indirectly obtained strings, the
  4030. @q<@@>@i<filespec> form, read the first line of the file up to but not
  4031. including the explicit carriage return.  Note if a trailing carriage return is
  4032. needed it must be expressed numerically, such as @q<\13> decimal.  Example:
  4033. @begin<example>
  4034. input 7 Password:
  4035. echo Please type your password:
  4036. output @@con
  4037. output \13
  4038. echo \13\10Thank you!
  4039. @end<example>
  4040. In this example, a TAKE file requests the user to type in the password
  4041. interactively, so that it does not have to be stored on disk as part of the
  4042. TAKE file.
  4043.  
  4044. @subheading<The PAUSE command>
  4045. Syntax: @q<PAUSE [{@i(number), @i(hh:mm:ss)}]>
  4046.  
  4047. PAUSE turns on the DTR signal, and then waits one or more seconds, or until
  4048. the specified time of day.  Pauses are frequently necessary to avoid
  4049. overdriving the host and to let a modem proceed through a dialing sequence
  4050. without interruptions from Kermit.  The default waiting time is set by SET
  4051. INPUT DEFAULT-@|TIMEOUT and is normally one second.  The optional integer
  4052. number selects the number of seconds to pause for this command, and the
  4053. @i<hh:mm:ss> selects a specific time of day.  An explicit value of zero
  4054. produces a pause of just a few milliseconds which can be useful in some
  4055. situations.
  4056.  
  4057. Text arriving during the PAUSE interval is shown on the screen, if SET
  4058. INPUT-ECHO is ON, and stored in a 128-byte internal buffer for rereading by a
  4059. following INPUT command.
  4060.  
  4061. PAUSE is interrupted if there is any activity on the keyboard.  Thus PAUSE can
  4062. be useful for operations like:
  4063. @begin<example>
  4064. echo "Type any key when ready..."
  4065. pause 9999
  4066. @end<example>
  4067.  
  4068. PAUSE is useful in scripts that are to be executed at some future time.
  4069. For instance, if you want your PC to dial up another computer and transfer some
  4070. files at 9:30pm, when the phone rates are lower, you can put the command
  4071. @example<PAUSE 21:30:00>
  4072. in your script file.  Note that you cannot specify a time more than 12 hours
  4073. in the future.  If you need to pause until a specific time that is more than 12
  4074. hours away, you can use multiple PAUSE statements:
  4075. @begin<example>
  4076. PAUSE 21:30:00  ; Pause until 9:30pm tonight
  4077. PAUSE  9:30:00  ; Pause until 9:30am tomorrow morning
  4078. @end<example>
  4079.  
  4080. Because PAUSE turns on the DTR signal, it can be useful in scripts where
  4081. DTR must be asserted for a second or two to wake up the device your PC is
  4082. connected to, before you can send any characters to it:
  4083. @begin<example>
  4084. pause 1         ; Assert DTR and pause for 1 second
  4085. output \13      ; Send a carriage return
  4086. @end<example>
  4087.  
  4088. @subheading<The WAIT Command>
  4089. Syntax: @q<WAIT [{@i(number), @i(hh:mm:ss)}] [\CD] [\CTS] [\DSR]>
  4090.  
  4091. WAIT performs a timed PAUSE, as above, but also examines the modem control
  4092. signals Carrier Detect (@q<\CD>), Clear To Send (@q<\CTS>), and/or Data Set
  4093. (modem) Ready (@q<\DSR>).  If all of the signals specified in the WAIT
  4094. statement are ON, or become ON before the timeout interval, the wait operation
  4095. ceases with an indication of SUCCESS.  If the time interval expires without
  4096. all of the specified signals on, the status is FAILURE.  Example:
  4097. @example(Kermit-MS> wait 12:45:00 \cd \dsr)
  4098. This waits until both CD and DSR asserted or until 45 minutes past noon,
  4099. whichever happens first, returning SUCCESS or FAILURE respectively.
  4100.  
  4101. If no modem signals are specified, then WAIT is the same as PAUSE.
  4102.  
  4103. @Subheading<Labels and the GOTO Command>
  4104. @index<Labels>@index<GOTO Command>
  4105.  Labels and the GOTO command work together in the same fashion as in DOS Batch
  4106. files.  A label is a line which starts with a colon (:) in the leftmost column
  4107. followed immediately by a word of text (no intervening spaces); material on the
  4108. line after the label is ignored.  The GOTO command is followed by a label, the
  4109. leading colon is optional in the GOTO command.  The label may be located either
  4110. before or after the GOTO command and is found by searching the TAKE file or
  4111. macro from the beginning.  Thus, duplicated labels will always use the first
  4112. occurrence.  The target label must be in the current TAKE file or macro; one
  4113. may not GOTO a label in another TAKE file or macro.  Example:
  4114. @begin<example>
  4115. :LOOP
  4116. echo again and\32
  4117. goto loop
  4118. @end<example>
  4119. will print "again and again and again and..." forever (until you type Ctrl-C).
  4120. As a macro:
  4121. @begin<example>
  4122. define test :loop,echo again and\32,goto loop
  4123. do test
  4124. @end<example>
  4125. Note that if a label follows a comma in a macro definition, there must be no
  4126. intervening spaces:
  4127. @begin<example>
  4128. define test ..., :top, ..., goto top  ; bad, space before colon.
  4129. define best ...,:top, ..., goto top   ; good, no space.
  4130. @end<example>
  4131. In this example, the best macro will work, the test macro won't.
  4132.  
  4133. @subheading<The IF Command>
  4134. @index<IF Command>
  4135. Syntax: @q<IF @i(test-condition) @i(MS-Kermit Command)>
  4136.  
  4137. The IF command gives MS-Kermit scripts the ability to make a decision based
  4138. upon the criterion specified as the @i(test-condition).  If the test condition
  4139. is true, then the command is executed.  Otherwise, it is skipped.  The test
  4140. conditions are:
  4141. @begin(description,leftmargin +12,indent -8)
  4142. NOT@\Modifier for other conditions below.
  4143.  
  4144. ALARM@\True if the current time of day is at or later than the alarm clock
  4145. time.  The alarm clock time is set by the command SET ALARM time.  IF ALARM
  4146. distinguishes early from late with a 12 hour field of view.
  4147.  
  4148. COUNT@\True if the current COUNT variable is greater than zero.  COUNT is a
  4149. special Kermit variable for each active TAKE file or macro.  It is set by the
  4150. command SET COUNT and it is both tested and modified by the IF COUNT command.
  4151. The intent is to construct simple script loops where the IF COUNT command first
  4152. decreases COUNT by one (but never below zero) and then if COUNT is greater than
  4153. zero the following Kermit command is executed.  Because COUNT exists only for
  4154. TAKE files and macros it cannot be used interactively.  Each TAKE file or macro
  4155. has its own distinct copy of COUNT, and nested TAKE files or macros do not
  4156. interact through their COUNTs.  Initially COUNT is zero.
  4157.  
  4158. DEFINED @i<symbol>@\True if the named macro or variable is defined.  You can
  4159. use this feature to remember things for future reference.
  4160.  
  4161. EQUAL @i<word1> @i<word2> @i<command>@\True if the two words are lexically
  4162. equal.  Alphabetic case is ignored unless SET INPUT CASE OBSERVE.  If they
  4163. match, the following command is executed.  The modifier NOT may be inserted
  4164. to invert the sense of the test.  Substitution variables may be used in place
  4165. of @i<word1> and @i<word2>, but the command will only work if these variables
  4166. contain single words, not phrases.  If @i<word1> or @i<word2> begin with
  4167. @q<@@>, then the rest of the word is interpreted as a file specification, and
  4168. the first word in the file is used.
  4169.  
  4170. ERRORLEVEL @i<number>@\True if the DOS errorlevel number matches or
  4171. exceeds the given (decimal) number.
  4172.  
  4173. EXIST @i<filespec>@\True if the specified file exists.
  4174.  
  4175. FAILURE@\True if the previous status-returning Kermit command reported
  4176. failure.
  4177.  
  4178. SUCCESS@\True if the previous status-returning Kermit command reported success.
  4179. When using IF SUCCESS and IF FAILURE, it is important to SET INPUT TIMEOUT
  4180. PROCEED, otherwise the script will quit immediately upon a failing INPUT or
  4181. REINPUT, before getting to the IF statement.
  4182. @end<description>
  4183.  
  4184. IF commands are closely modeled on those of DOS Batch files, for familiarity.
  4185. They consist of a test condition, perhaps modified by the leading word NOT, and
  4186. then any legal Kermit command.  GOTO is an especially useful command here to
  4187. branch in the TAKE file or macro.
  4188.  
  4189. The "object" of an IF command is a Kermit command, which can be:
  4190. @begin<itemize>
  4191. A regular, predefined Kermit command, like @q<SEND FOO.BAR> or @q<SET SPEED
  4192. 1200>.
  4193.  
  4194. A GOTO, allowing subsequent statements to be skipped.
  4195.  
  4196. Another IF command, as in @q<IF DEFINED \%3 IF EXIST FOO.BAR SEND FOO.BAR>.
  4197. The SEND command is executed only if both IF conditions are true.
  4198.  
  4199. A macro.  This allows a semblence of structured programming, with an implied
  4200. "begin" and "end" around the commands that compose the macro.  For instance:
  4201. @begin<example>
  4202. define giveup echo I give up!, hangup, stop
  4203. input 10 Login:
  4204. if failure giveup
  4205. output myusername
  4206. @end<example>
  4207. @end<itemize>
  4208.  
  4209. The Kermit commands which yield SUCCESS or FAILURE conditions are: GET, SEND,
  4210. RECEIVE, the REMOTE commands, INPUT, REINPUT, BYE, FINISH, LOGOUT, and WAIT.
  4211.  
  4212. @subheading<The POP and STOP Commands>
  4213. @index<POP Command>@index<STOP Command>
  4214.  
  4215. Use these commands for terminating execution of a TAKE file or macro.
  4216. POP terminates the current level and returns to the previous level.  For
  4217. example, if you gave the command "take shower", and the SHOWER file contained a
  4218. command "take bath", and the BATH file contained a command "take hike", and a
  4219. POP command was encountered in the HIKE file, then the next command executed
  4220. would be the one following the "take hike" command in the BATH file.  If a
  4221. STOP command was encountered in any of these files, MS-Kermit would return
  4222. immediately to interactive command level.  POP and STOP work in similar
  4223. fashion with nested macro invocations: POP returns to the invoking macro, STOP
  4224. returns to command level.
  4225.  
  4226. @subheading<Script Examples>
  4227.  
  4228. A counting loop.  This TAKE file excerpt says hello three times, then says
  4229. goodbye:
  4230. @begin<example>
  4231. set count 3             ; Prime the loop counter for three passes
  4232. :TOP                    ; A label for GOTO
  4233. echo Hello\13           ; Something to see, with carriage return
  4234. if count goto top       ; Loop if COUNT is greater than zero
  4235. echo Goodbye!\13
  4236. @end<example>
  4237.  
  4238. @index<Modem>
  4239. Figure @ref<-msdialscr> shows a simple script file that logs in to a computer,
  4240. prompting the user for her password using the @q<@@con> construction, and then
  4241. connects as a terminal.
  4242. @begin(figure)
  4243. @bar()
  4244. @blankspace(1)
  4245. @begin<example>
  4246. define ermsg echo \%1\13, stop       ; Define an error handling macro.
  4247. clear                                ; Clear the input buffer.
  4248. set speed 9600                       ; Set the transmission speed.
  4249. output \13                           ; Carriage return to awaken host.
  4250. input 15 Login:                      ; Wait up to 15 secs for prompt.
  4251. if failure ermsg No_login_prompt!    ; Give up if none.
  4252. output Sari\13                       ; Send username and CR.
  4253. set input echo off                   ; Privacy, please.
  4254. input 5 Password:                    ; Quietly wait for this.
  4255. if failure ermsg No_password_prompt! ; Give up if it doesn't come.
  4256. echo Type your password now...       ; Make our own prompt.
  4257. output @@CON                          ; Send console keystrokes.
  4258. output \13                           ; Add a real carriage return.
  4259. input 30 $                           ; Wait for system prompt.
  4260. if failure ermsg No_system_prompt!   ; Give up if none.
  4261. connect                              ; Start terminal emulation.
  4262. @end<example>
  4263. @caption(MS-Kermit Script for Logging In)
  4264. @tag<-msdialscr>
  4265. @bar()
  4266. @end(figure)
  4267. Notice the semicolons used to indicate comments in TAKE files.  If these same
  4268. commands were typed by hand at the Kermit prompt the semicolon material would
  4269. be considered part of a string!  Typing a Control-C will interrupt and
  4270. terminate any of the commands.
  4271.  
  4272. Figure @ref<-mshhh> illustrates some detailed control of the Hayes 2400 modem.
  4273. Some understanding of the Hayes dialing language is helpful for deciphering
  4274. this script (consult your Hayes modem manual).  If the script is stored in a
  4275. file called @q<HAYES.SCR>, then a DIAL macro can be defined like this:
  4276. @begin<example>
  4277. define dial take hayes.scr
  4278. @end<example>
  4279. The trick here is that any invocation of the "dial" or "do dial" command with
  4280. an operand will set the variable @q<\%1>, which is used in the TAKE file, for
  4281. instance:
  4282. @example<dial 765-4321>
  4283. will set @q<\%1> to "765-4321", the number to be dialed.  You can also type
  4284. @example<dial {212 765 4321}>
  4285. if you want to include spaces in the phone number.  This script requires
  4286. version 2.32 of Kermit or later.
  4287. @begin(figure)
  4288. @case(device,file="@bar()@blankspace(1)",else="@comment(nothing)")
  4289. @begin<example>
  4290. def errstop echo \%1\13, def \%1, hang, stop ; Error handler.
  4291. if not defined \%1 errstop {Please supply a phone number!}
  4292. assign \%n \%1                       ; Copy the phone number.
  4293. clear                                ; Clear the input buffer.
  4294. set speed 2400                       ; Dial at high speed.
  4295. wait 2 \cts                          ; Is modem turned on?
  4296. if fail errstop {Please turn on your modem.} ; No.
  4297. echo Initializing modem...\13\10     ; Yes.
  4298. output ATZ\13                        ; Reset the modem.
  4299. pause 2                              ; Give it a little time.
  4300. output AT F1 Q0 V1 X4 S0=0\13        ; Put modem in known state.
  4301. input 8 OK                           ; Look for response.
  4302. if fail errstop {Can't initialize modem.}
  4303. pause 1                              ; Pause for a second first.
  4304. set count 5                 ; Set the redial limit.
  4305. define \%d \13Dialing                ; Initial dial message.
  4306. :REDIAL
  4307. echo \%d \%n...\13\10                ; Tell them we're dialing.
  4308. output ATDT\%n\13                    ; Dial the phone number.
  4309. clear                                ; Clear away the command echo.
  4310. input 60 CONNECT             ; Wait for CONNECT message.
  4311. if success goto speed                ; Got it, go check speed.
  4312. define \%m No dialtone or no answer. ; Make this the error message.
  4313. reinput BUSY                         ; Didn't connect.  Was it busy?
  4314. if failure errstop {\%m\10\13Try again later.} ; No
  4315. Echo \13Busy...                      ; It's busy, let them know.
  4316. hangup                               ; Drop DTR momentarily. 
  4317. pause 60                             ; Wait one minute.
  4318. define \%d \13Redialing              ; Change message to "Redialing".
  4319. if count goto redial                 ; Then go redial.
  4320. define \%m \13Line busy.             ; After 5 tries set this message.
  4321. :SPEED                               ; Connected!
  4322. pause 1                              ; Wait for text after CONNECT.
  4323. define \%s 2400                      ; Assume speed is 2400.
  4324. reinput 1 2400                       ; Rescan current text for "2400"
  4325. if success goto done                 ; It is.
  4326. define \%s 1200                      ; It isn't, so assume 1200.
  4327. reinput 1 1200                       ; Is it?
  4328. if failure define \%s 300            ; It isn't, so it must be 300.
  4329. :DONE                                ; We know the speed.
  4330. set speed \%s                        ; So set it.
  4331. echo Connecting at \%s bps...\13     ; Tell the user.
  4332. pause 2                              ; Give her a chance to read it.
  4333. set terminal clear                   ; Clear screen.
  4334. define \%1                           ; Clear argument.
  4335. connect                              ; And start terminal emulation.
  4336. @end<example>
  4337. @caption(MS-Kermit Script for More Control of a Hayes 2400 bps Modem)
  4338. @tag<-mshhh>
  4339. @bar()
  4340. @end(figure)
  4341.  
  4342. A combination of DOS Batch and Kermit Script files is shown in Figures
  4343. @ref<-mssendbat> and @ref<-msmailscr> (see your DOS manual for an explanation
  4344. of the batch file syntax).  The purpose is to allow a user to say @qq(SEND
  4345. @i<filename>) at the DOS prompt.  The DOS batch shell, @q<SEND.BAT>, and the
  4346. login script, @q<KX>, are combined to login to a VAX through a data switch, run
  4347. VMS Kermit in server mode, transfer the file, submit it to VMS Mail, delete the
  4348. disk file, shut down the server and logout from the VAX, and report the overall
  4349. transfer status.  The user is asked to provide a password interactively.
  4350. @begin(figure)
  4351. @bar()
  4352. @blankspace(1)
  4353. File @q<SEND.BAT>, DOS batch program:
  4354. @begin<example>
  4355. echo off
  4356. Rem Kermit, one-line file mailer, by Joe Doupnik.
  4357. Rem Logon to VAX, run Kermit, Send user's file,
  4358. Rem  post via MAIL, logout from VAX.
  4359. if ".%2" == "." goto usage
  4360. if exist %1 goto proceed
  4361. echo No file to send!
  4362. :usage
  4363. echo Usage is SEND filename username
  4364. goto done
  4365. :proceed
  4366. echo Logging onto the Vax ...
  4367. kermit set disp q,take kx,send %1,pau,rem host mail %1 %2,pau 2,bye,
  4368. if errorlevel 3 goto badrem
  4369. if errorlevel 2 goto badrcv
  4370. if errorlevel 1 goto badsnd
  4371. echo File(s) "%1" has been mailed to %2.
  4372. goto done
  4373. :badrem
  4374. echo Mail did not cooperate!
  4375. :badrcv
  4376. echo Receive failed!
  4377. goto done
  4378. :badsnd
  4379. echo Send failed!
  4380. goto done
  4381. :done
  4382. echo on
  4383. @end<example>
  4384. @caption(MS-DOS Batch File Invoking Kermit to Send VAX Mail)
  4385. @tag<-mssendbat>
  4386. @bar()
  4387. @end(figure)
  4388.  
  4389. @begin(figure)
  4390. @bar()
  4391. @blankspace(1)
  4392. File KX, Kermit script:
  4393. @begin<example>
  4394. Comment Login script for VAXA via Micom data PBX Switch.
  4395. set input timeout quit
  4396. set input echo off
  4397. set display quiet
  4398. output \13
  4399. comment - "slowly." and "CLASS" are part of the switch's prompt.
  4400. input 10 slowly.
  4401. input 10 CLASS
  4402. pause
  4403. comment - Slowly tell switch "vaxa", wait for beep.
  4404. output v
  4405. output a
  4406. output x
  4407. output a
  4408. output \13
  4409. pause
  4410. input 5 \7
  4411. comment - Done with Switch, wake up the VAX and log in.
  4412. pause
  4413. output \13
  4414. pause
  4415. input 5 Username:
  4416. set input timeout proceed
  4417. output MYNAME\13
  4418. input 2 Password:
  4419. comment - Prompt ourselves, then get password from console.
  4420. echo Enter password:
  4421. output @@con
  4422. comment - Send a carriage return at the end of the password.
  4423. output \13
  4424. comment - Expect ESC Z from the VAX's Set Term/Inquire...
  4425. comment - Respond ESC [ <query symbol> 6 c   (say we are VT102).
  4426. comment - Note syntax for including question mark!
  4427. input 15 \27Z
  4428. output \27[\{63}6c
  4429. comment Look for VMS dollar sign prompt
  4430. input 15 $
  4431. comment Start VMS Kermit and place it in server mode
  4432. output kermit server\13
  4433. comment - allow server's message to finish, "machine." appears twice.
  4434. input 10 machine.
  4435. input 10 machine.
  4436. pause
  4437. @end<example>
  4438. @caption(MS-Kermit Script for Logging into VAX and Sending Mail)
  4439. @tag<-msmailscr>
  4440. @bar()
  4441. @end(figure)
  4442.  
  4443. @Section<Initialization Files Revisited>
  4444. @label<-msini>
  4445. @index<MSKERMIT.INI>
  4446. @index<IBM Mainframe>@index<7171>@index<Protocol Converter>
  4447.  At Columbia University, we have IBM 370-series mainframes running VM/CMS,
  4448. and VAX and SUN systems running Unix.  All of these
  4449. systems are accessible through an IBM/Rolm (now Siemens/Rolm) voice/data CBX.
  4450. The IBM
  4451. systems have two different kinds of front ends, a COMTEN 3695 (similar to IBM
  4452. 3705) for linemode half-@|duplex connections, and various Series/1-@|style
  4453. protocol converters (including the 7171 and 4994) for full-screen, full-duplex
  4454. 3270 emulation, all of which use various combinations of parity and other
  4455. settings.  The VAX is connected directly to the CBX, whereas the SUNs are
  4456. connected to the CBX through Cisco Ethernet terminal servers.
  4457. Figure @ref<-msinifig> shows the @q<MSKERMIT.INI> file used at Columbia
  4458. for automatic login to these systems.  It illustrates the creative use of
  4459. macros and scripts. Numerous site- and system-@|dependent key definitions have
  4460. been omitted.
  4461. @begin(figure)
  4462. @bar()
  4463. @blankspace(1)
  4464. @begin<example,leftmargin 0,rightmargin 0>
  4465. ; MS-Kermit 2.31, 2.32 Initialization File for the IBM PC, XT, AT, PS2, etc.
  4466. ; Christine Gianone, Vace Kundakci, Columbia University, December 1988
  4467. echo Columbia University IBM PC Kermit Initialization file...
  4468.  
  4469. ; User IDs on various systems.  Substitute your own IDs.
  4470. def \%c XYZCU          ; User ID for IBM mainframe
  4471. def \%u xyz            ; UNIX ID for UNIX
  4472.  
  4473. ; General settings
  4474. set warning on         ; Change this to "off" to allow overwriting of files.
  4475. set speed 9600         ; Use 9600 bits per second by default
  4476. set term vt102         ; Emulate a DEC VT-102 terminal
  4477. set term wrap on       ; Have Kermit wrap lines at column 80
  4478.  
  4479. ; Behavior of INPUT command in script programs
  4480. set input timeout quit ; Exit from script if input pattern not found
  4481. set input echo on      ; Echo characters that arrive during INPUT
  4482. set input case observe ; Match according to alphabetic case
  4483.  
  4484. ; Macros for connecting to different systems thru the IBM/Rolm CBX
  4485. def cuvmb  do cbx,o c cuvm\13,  i 10 PLETE,      do 3695, o vmb\13, do 4381
  4486. def simb   do cbx,o c simb\13,  i 10 PLETE, pau, do 7171, do 3270
  4487. def cunix  do cbx,o c cunix\13, i 10 PLETE, pau, do cuts, do unix
  4488. def cunixa def \%s cunixa,do cunix
  4489. def cunixb def \%s cunixb,do cunix
  4490. def cunixc do cbx,o c cunixc\13,i 10 PLETE, pau, out \13, do unix
  4491.  
  4492. ; Macros for navigating thru front end and login prompts
  4493. def cbx  do def,o \13,i 10 MODIFY?                          ; IBM/Rolm CBX
  4494. def 3695 i 5 ING CHARACTERS:\32\32                          ; COMTEN
  4495. def 7171 pau,cle,o \13,i 5 TERMINAL TYPE:\32,o vt-100\13    ; 7171 front end
  4496. def 4381 do vml,i 5 BREAK KEY,o \b,i 5 .\17,o LOG \%c\13,c  ; VM/CMS linemode
  4497. def 3270 pau,cle,o \13,o L \%c\13,do vmf,c                  ; VM/CMS fullsc.
  4498.  
  4499. ; CU Terminal Servers (cutsa, cutsb, etc)
  4500. def cuts set inp tim p,out \13,pau,set co 8,:loop,out \13,i 3 >,-
  4501. if suc goto ok,if cou goto loop,ech Failed,stop,:ok,out \%s\13,set inp tim q
  4502.  
  4503. ; UNIX login with speed matching
  4504. def unix set inp timeout proc,set count 8,-
  4505. :loop,i 5 login:\32,if suc goto ok,out \13,if count goto loop,-
  4506. echo Failed,stop,:ok,out \%u\13,do dec,set inp tim q,connect
  4507.  
  4508. ; Macros for interacting with different systems:
  4509. def vml do tty,set par m,set k \270 \8,  set k \3 \Kbreak    ; VM linemode
  4510. def vmf do def,set par e,set k \270 \8,  set k \3 \3,do simk ; VM fullscreen
  4511. def dec do def,set par n,set k \270 \127,set k \3 \3         ; DEC, SUN, etc
  4512. def def set tim of,set loc of,set hand non,set flow xon,do nosimk ; Default
  4513. def tty set tim on,set loc on,set hand xon,set flow non,do nosimk ; IBM TTY
  4514. @end<example>
  4515. @caption(An Advanced MS-Kermit Initialization File)
  4516. @tag<-msinifig>
  4517. @bar()
  4518. @end(figure)
  4519.  
  4520. A bit of explanation might clarify some of this.  The IBM/Rolm CBX prompt is
  4521. "CALL, DISPLAY OR MODIFY?" and we respond with a CALL command for the desired
  4522. system or front end, like CALL SIMB (IBM mainframe in full screen mode through
  4523. a 7171 protocol converter), CALL CUVMB (IBM mainframe in linemode through the
  4524. COMTEN), CALL CUNIXC (a VAX), or CALL CUNIXA (a SUN, through an Ethernet
  4525. terminal server).  When the initial call through the CBX is completed, the
  4526. message "CALL COMPLETE" appears, and then begins the interaction with the
  4527. desired host, front end, or terminal server, each of which has its own set
  4528. of prompts and responses.
  4529.  
  4530. To connect to a given system, one types "do simb", "do cunixc" to invoke a
  4531. "connecting" macro.  Each of these, in turn, invokes the CBX macro to navigate
  4532. through the CBX to the desired system.  If the CALL COMPLETE message is
  4533. encountered, then further macros (3695, 7171, etc) are used to get past any
  4534. associated front end (e.g. to tell the COMTEN which IBM mainframe is wanted,
  4535. or to tell the protocol converter what terminal to emulate), and then to login
  4536. on the desired system, prompting on the screen for user ID and password.
  4537. Finally, a macro like "vml" (VM linemode), "xed" (XEDIT, i.e. VM full screen),
  4538. or "dec" (VAX or SUN) is executed to set the communication parameters for the
  4539. system just logged in to.  The key definitions that are shown in the "vml",
  4540. "xed", and "dec" macros assign the host's character deletion code (backspace
  4541. or rubout) to the AT's backarrow key.
  4542.  
  4543. @Section<International Character Sets>
  4544.  
  4545. @index<International Characters> MS-Kermit may be used on the IBM family and
  4546. compatibles for interacting with host computers in different languages.  MS
  4547. Kermit CONNECT mode has separate translation mechanisms for screen and
  4548. keyboard. Keyboard translations are managed through the SET KEY facility which
  4549. maintains a table of defined keys and their output values (single characters,
  4550. strings, or Kermit keyboard verbs). The keyboard is normally read via the
  4551. system Bios, but it may also be read via DOS (with a loss of some key
  4552. combinations) by saying SET KEY OFF (i.e., turn off Bios reading). The
  4553. keyboard can be modified rapidly by a group of SET KEY commands placed in a
  4554. macro. The host has no direct control of the keyboard translations; the host
  4555. thinks Kermit is a real Digital VT102/VT52 or Tektronix 4010 terminal and
  4556. those devices do not have redefinable keys.
  4557.  
  4558. Screen translation is accomplished in two places, the SET TRANSLATION INPUT
  4559. table and the built-in character sets.  SET TRANSLATION INPUT is a table of
  4560. received versus reported character codes, and it is enabled by SET TRANSLATION
  4561. INPUT ON.  The table is initially an identity which allows individual entries
  4562. to be modified as desired by the command
  4563. @begin(example)
  4564. SET TRANSLATION INPUT @i(<received-code>) @i(<displayed-code>)
  4565. @end(example)
  4566.  
  4567. Only characters destined for the screen as text or cursor control (control
  4568. codes) are translated; escape sequences and transparent printing characters
  4569. bypass the SET TRANSLATION table.  The table is bypassed for printing to
  4570. permit binary graphics streams to be sent to the printer.  A character about
  4571. to be shown on the screen can be modified by selection of a character set,
  4572. such as US-ASCII, UK-ASCII, ALTERNATE-ROM, or line drawing.
  4573.  
  4574. The SET TRANSLATION INPUT mechanism operates at the Kermit command level and
  4575. is available to macros, TAKE files, and hand typed control.  Host control is
  4576. available only indirectly via the special macros TERMINALR and TERMINALS,
  4577. discussed below, which may contain the SET TRANSLATION INPUT and other
  4578. commands.
  4579.  
  4580. Character sets can be selected either by the Kermit command SET TERMINAL
  4581. CHARACTER-SET (expressed by hand, in macros, or in Take files), or by host
  4582. control of the terminal emulator via the escape sequences
  4583. @w[@q<ESC ( >@i<char>]  or @w[@q<ESC ) >@i<char>] and the Control-O and
  4584. Control-N codes.  Thus, rapid changes of displayed characters is available to
  4585. the host and to the user through all three dynamic pathways: macros, Take
  4586. files, hand typing or received codes.
  4587.  
  4588. Version 2.32 of MS-Kermit also includes a new ability to operate right-to-left
  4589. during CONNECT mode, in order to interact with Hebrew or Arabic language
  4590. applications on the host computer.  The pertinent commands are
  4591. SET TERMINAL DIRECTION {LEFT-TO-RIGHT | RIGHT-TO-LEFT}, and SET TERMINAL
  4592. CHARACTER-SET ALTERNATE-ROM.  The latter command makes these high bit
  4593. characters available by active user selection, or by reception of the escape
  4594. sequences below to associate them with one of the two VT102 character set
  4595. pointers called G0 (normal) and G1 (alternate).  Arrival of Control-O selects
  4596. the G0 set (default) and Control-N the G1 set.
  4597.  
  4598. In addition, two special macro names TERMINALR and TERMINALS have been set
  4599. aside, which can be invoked within the VT102 emulator by reception from the
  4600. host of the special escape sequences:
  4601. @begin<format>
  4602. @q<  ESC [ ? 34 h    >(invokes macro TERMINALS)
  4603. @q<  ESC [ ? 34 l    >(lower case L, invokes macro TERMINALR)
  4604. @end<format>
  4605. and/or by using new keyboard "verbs" (not preassigned to keys):
  4606. @begin<format>
  4607. @q<  \Kterminals     >(invokes macro TERMINALS)
  4608. @q<  \Kterminalr     >(invokes macro TERMINALR)
  4609. @end<format>
  4610.  
  4611. When these macros are invoked within the terminal emulator and if they
  4612. are defined then CONNECT mode is exited and the macro is executed.  There is
  4613. no automatic return to Connect mode at the completion of the macro.  If the
  4614. macro is not defined then CONNECT is not exited and nothing happens.
  4615. Initially neither macro is defined.  If a return to Connect mode is desired
  4616. then include CONNECT in the macro.  Any legal action is permitted in these
  4617. macros, including invoking other macros and Take files.
  4618.  
  4619. The purpose of these two names and macros is to allow a host or the local
  4620. user to interactively select two local operations while within the terminal
  4621. emulator, such as changing language specific setups or other desirable
  4622. things, which are much more involved than an existing keyboard verb.  There
  4623. is no restriction on what the macros may do since Kermit is then operating
  4624. not in Connect mode but at the Kermit command prompt level, as it is for
  4625. other macros.
  4626.  
  4627. The escape sequences above are a Kermit specific extensions of Digital
  4628. Equipment Corporation's private escape sequences to set and reset modes;
  4629. hence the letters S and R in the macro names.
  4630.  
  4631. One suggestion for employing SET TERM DIRECTION, SET TERM CHARACTER, and
  4632. the macros TERMINALR and TERMINALS to facilitate mixed Hebrew@index<Hebrew>
  4633. and English communications is the simple Take file below:
  4634. @begin<example>
  4635. ; Define macros hebrew and english to do all the work
  4636.  
  4637. def hebrew  set term dir right, set term char alt, hkey, comkey
  4638. def english set term dir left, set term char us, set key clear, comkey
  4639.  
  4640. ; Define host-reachable macros for on the fly changes while
  4641. ; staying in the emulator
  4642.  
  4643. def terminalr english, connect
  4644. def terminals hebrew, connect
  4645.  
  4646. ; Define IBM-PC F1 key as switch to English, F2 as switch to Hebrew.
  4647. ; Done here to be remembered despite SET KEY CLEAR in macro English.
  4648. ; F1 and F2 thus are user-level commands during emulation.
  4649.  
  4650. def comkey set k \315 \Kterminalr,set k \316 \Kterminals
  4651.  
  4652. ; Define SET KEYs for Hebrew keyboard layout via macro hkey
  4653.  
  4654. def hkey set k \x27 \x2c,set k \x2c \x9a,set k . \x95,set k / \x2e,-
  4655.  set k \x3b \x93,set k \x60 \x3b,set k a \x99,set k b \x90, hkey1
  4656. def hkey1 set k c \x81,set k d \x82,set k e \x97,set k f \x8b,-
  4657.  set k g \x92,set k h \x89,set k i \x8f,set k k \x87,hkey2
  4658. def hkey2 set k l \x8c,set k m \x8a,set k m \x96,set k n \x8e,-
  4659.  set k o \x8d,set k p \x94,set k q /,set k r \x98,set k s \x83,hkey3
  4660. def hkey3 set k t \x80,set k u \x85,set k v \x84,set k x \x91,-
  4661.  set k y \x88,set k z \x86
  4662. @end<example>
  4663. After executing this file, one may switch Connect mode language support
  4664. between Hebrew (right to left, national display characters, similarly
  4665. translate outgoing keyboard characters) and English by stating a single
  4666. keyword at the Kermit prompt, "Hebrew" or "English", or while within Connect
  4667. mode by pushing the F1 or F2 keys (in this example), or by reception of
  4668. @w(@q<ESC [ ? 34 h> or @q<l>) from the host.  All the work is done from memory
  4669. material and is essentially instantaneous.  Clearly, other languages can also
  4670. utilize these tools.
  4671.  
  4672. IBM PCs or compatibles will normally have national characters installed
  4673. in the upper portion of the character set ROM, in positions 80H-9AH.  EGA
  4674. systems generally come with a program to load the appropriate national
  4675. character set into this portion of memory, such as HEBEGA for Hebrew.  Version
  4676. 3.30 (and later) of DOS supports the notion of "Code Page@index<Code Page>"
  4677. for PS/2 systems, or other systems with EGA or LCD adapters, described in
  4678. Appendices B and C of the DOS 3.30 reference manual.
  4679.  
  4680. @Section<MS-Kermit Features for Different Systems>
  4681. @label<-msfeatures>
  4682.  
  4683. As noted early on, MS-Kermit was designed primarily for the IBM PC family, and
  4684. later adapted to various non-IBM-@|compatible MS-DOS (and even non-@|MS-DOS)
  4685. systems.  Some of these adaptations provide all the features of the IBM PC
  4686. version, others provide only a subset, and still others may include features
  4687. not available on the IBM family.  These features are all of the
  4688. system-dependent variety; the Kermit file transfer protocol should be
  4689. implemented identically on all versions of MS-Kermit.  The most obvious
  4690. differences are in the terminal emulation options and the keyboards.  Table
  4691. @ref<-mstermops> shows the terminal emulation options for the systems presently
  4692. supported by Kermit-MS, and Table @ref(-msskeys), shows which keys are used for
  4693. screen rollback on the various systems supported by MS-Kermit.
  4694.  
  4695. @begin<table>
  4696. @bar()
  4697. @index<Rainbow>
  4698. @blankspace(1)
  4699. @begin<format,leftmargin +2,above 1,below 1,group>
  4700. @tabclear()@tabset(1.5inches,2.5inches,3.8inches)
  4701. @ux(System)@\@ux(EscChar)@\@ux(Capabilities)@\@ux(Terminal Service)
  4702. ACT Apricot  @\  @q(^])   @\@q<      K  >@\VT52 ???
  4703. DEC Rainbow  @\  @q(^])   @\@q<R   P K D>@\VT102 firmware
  4704. DECmate/DOS  @\  @q(^])   @\@q<      K  >@\VT100
  4705. Generic DOS  @\  @q(^])   @\@q<      K  >@\Depends on system
  4706. Grid Compass @\  @q(^])   @\@q<      K  >@\???
  4707. HP-110       @\  @q(^])   @\@q<      K  >@\Dumb terminal
  4708. HP-150       @\  @q(^])   @\@q<R     K  >@\HP-2623 firmware
  4709. IBM PC family@\  @q(^])   @\@q<R M P K D>@\H19,VT52,VT102,Tek emulation
  4710. Intel 3xx    @\  @q(^])   @\@q<      K  >@\Uses real terminal
  4711. NEC 9801     @\  @q(^])   @\@q<  M P K D>@\VT102, Tektronix emulation
  4712. NEC APC3     @\  @q(^])   @\@q<R M P K D>@\H19,VT52,VT102 emulation
  4713. NEC APC      @\  @q(^])   @\@q<R   P K  >@\VT100, ADM3A firmware
  4714. Olivetti M24 @\  @q(^])   @\@q<R M P K D>@\Same as IBM PC
  4715. Sanyo MBC55x @\  @q(^])   @\@q<R M P K D>@\H19,VT52,VT102 emulation
  4716. Wang PC      @\  @q(^A)   @\@q<      K  >@\Wang firmware
  4717. TI Pro       @\  @q(^])   @\@q<  M P K  >@\VT100/Tektronix
  4718. Victor 9000  @\  @q<Alt-]>@\@q<  M P K D>@\H19,VT52,VT102 and/or Tek4010
  4719. Zenith Z100  @\  @q(^])   @\@q<      K  >@\Heath-19 emulation
  4720. @end(format)
  4721. @begin<center>
  4722. @q<R>=Rollback, @q<M>=Modeline, @q<P>=Printer control, @~
  4723. @q<K>=Key redefinition, @q<D>=screen Dump
  4724. @end<center>
  4725. @caption(Kermit-MS Terminal Emulation Options)
  4726. @tag(-mstermops)
  4727. @bar()
  4728. @end(table)
  4729.  
  4730. @begin<table>
  4731. @bar()
  4732. @blankspace(1)
  4733. @begin<format>
  4734. @tabclear()@tabset(1inch,2.4inch,4.0inch,5.2inch,6.0inch)
  4735. @ux<System>@\@ux<Screen Down>@\@ux<Line Down>@\@ux<Screen Up>@\@ux<Line Up>
  4736. IBM PC  @\PgUp      @\Ctrl-PgUp      @\PgDn      @\Ctrl-PgDn
  4737. Rainbow @\PrevScreen@\Ctrl-PrevScreen@\NextScreen@\Ctrl-NextScreen
  4738. HP-150  @\Prev      @\Shift-UpArrow  @\Next      @\Shift-DownArrow
  4739. NEC APC @\Uparrow   @\Ctrl-UpArrow   @\DownArrow @\Ctrl-DownArrow
  4740. NEC APC3@\PgUp      @\Ctrl-PgUp      @\PgDn      @\Ctrl-PgDn
  4741. Sanyo 55x@\PgUp     @\Ctrl-RtArrow   @\PgDn      @\Ctrl-PgDn
  4742. @end(format)
  4743. @begin(text)
  4744. The IBM PC also allows use of the Home key to get to the top of its display
  4745. memory and End key to get to the bottom, and the keypad minus (@q<->) key to
  4746. toggle the mode line on and off.  The Rainbow uses Shift-Next-Screen to get to
  4747. the bottom of its display memory, but provides no key for moving directly to
  4748. the top.
  4749. @end(text)
  4750. @caption(Kermit-MS Screen Scroll Keys)
  4751. @tag(-msskeys)
  4752. @bar()
  4753. @end(table)
  4754.  
  4755. @index<CTTY>
  4756. Another difference is the default communication port, the number of
  4757. communication ports supported, and the names given to them.  For instance, the
  4758. IBM PC family supports COM1 and COM2, and uses COM1 by default.  MS-Kermit may
  4759. be persuaded to support higher-@|numbered IBM ports using the method outlined
  4760. in section @ref<-msports>.  For remote operation, IBM's name for the console is
  4761. CON, so if you CTTY COM1, you do CTTY CON to put the PC back to normal.
  4762.  
  4763. @subheading<The DEC Rainbow>
  4764.  
  4765. @index<Rainbow>
  4766. The DEC Rainbow version of MS-Kermit uses the built-in VT102 terminal
  4767. firmware and setup modes, and can operate at speeds up to 9600 baud.  It has no
  4768. 25th screen line, and therefore no Kermit mode line during CONNECT.  It
  4769. supports only the Rainbow's single communication port, and not the printer
  4770. port, so SET PORT for the Rainbow is not implemented (but of course the printer
  4771. may be used for printing.)  The Rainbow may be put in remote mode by CTTY AUX,
  4772. and returned to normal with CTTY SCRN.  The Rainbow supports several SET
  4773. TERMINAL commands: VT102, VT52, and ROLL.
  4774.  
  4775. The keypad and cursor keys all work properly in VT102 and VT52 modes and in
  4776. application as well as native states (they never had in previous versions).
  4777. Newline mode is activated for received characters (LF ==> CR/LF).  Screen roll
  4778. back is almost 11 screenfuls.  Table @ref<-mssrbverbs> shows the verb names and
  4779. default key assignments for the Rainbow.  On the main typewriter keyboard the
  4780. shifted comma and period are converted to special keys available for Set Key
  4781. assignment without impacting the normal unshifted ASCII actions; Shift Lock has
  4782. no effect on these keys.
  4783.  
  4784. @begin<table>
  4785. @bar()
  4786. @blankspace(1)
  4787. @begin<example>
  4788. @ux<Rainbow Key>           @ux<Verb Name>      @ux<Operation>
  4789.  
  4790. PF1                   \Kpf1,\Kgold   Keypad function key
  4791. PF2..PF4              \Kpf2..\Kpf4   Keypad function keys
  4792. keypad 0..9           \Kkp0..\Kkp9   Keypad digit keys
  4793. keypad -              \Kkpminus      Keypad minus key
  4794. keypad ,              \Kkpcoma       Keypad commma
  4795. keypad .              \Kkpdot        Keypad dot (period) key
  4796. keypad Enter          \Kkpenter      Keypad Enter key
  4797.  
  4798. up arrow              \Kuparr        Cursor keys
  4799. down arrow            \Kdnarr
  4800. left arrow            \Klfarr
  4801. right arrow           \Krtarr
  4802. Shift Prev Screen     \Khome         Rewind to start of screen buffer
  4803. Shift Next Screen     \Kend          Unwind to end of screen buffer
  4804. Ctrl Prev screen      \Kupone        Backup one screen line
  4805. Ctrl Next screen      \Kdnone        Advance one screen line
  4806. Prev screen           \Kupscn        Backup one screen
  4807. Next screen           \Kdnscn        Advance one screen
  4808. Print Screen          \Kprtscr       Copy screen to printer
  4809. Ctrl Print Screen     \Ktoggle_prn   Toggle echoing screen to printer
  4810.                                       (printer failure resets toggle)
  4811. Do                    \Kdump         Copy screen to file (KERMIT.SCN)
  4812. Break                 \Kbreak        Send a BREAK
  4813. Shift Break           \Klbreak       Send a Long BREAK
  4814. Main Screen           \KDOS          Push to DOS
  4815. Help                  \Khelp         Show Connect mode help menu
  4816. Exit                  \Kexit         Exit Connect mode
  4817. *                     \Knull         send a null out the serial port
  4818. *                     \Khangup       hangup phone by dropping DTR, RTS
  4819. *                     \Klogon        resume logging, if active
  4820. *                     \Klogof        suspend logging
  4821. *                     \Kstatus       display status table
  4822.  
  4823. * (verbs not pre-assigned to keys)
  4824.  
  4825. @end(example)
  4826. @caption(Kermit-MS Verbs for the DEC Rainbow)
  4827. @tag<-mssrbverbs>
  4828. @bar()
  4829. @end(table)
  4830.  
  4831. @subheading<The DECmate II>
  4832.  
  4833. MS-Kermit for the DECmate II with the XPU option is somewhat similar to Rainbow
  4834. Kermit.  It uses built-in terminal VT100 firmware and setup modes and baud
  4835. rates up to 9600 on the single communication port.  The printer port is not
  4836. available for communications in this version.  There is no mode line, but other
  4837. connect-mode escapes are supported, including sending BREAK.  Disks A through I
  4838. are supported, and the floppy disk format is compatible with the Rainbow.  DEC
  4839. utilities are available for file conversion between DOS and WPS-8 files.
  4840.  
  4841. @subheading<The NEC APC3>
  4842. @index<NEC APC3>
  4843.  
  4844. The NEC APC3 version of MS-Kermit assumes that the @q<ANSI.SYS>@index<ANSI.SYS>
  4845. driver has been installed and that a color monitor is being used; the color
  4846. graphics option is not used by Kermit.  Although the display should be entirely
  4847. sensible with a monochrome system, it has not been tested.  Differences from
  4848. the IBM PC version include:
  4849.  
  4850. SET BAUD: The useful baud rates supported range from 300 to 9600.
  4851.  
  4852. SET PORT: The available ports are 1, 2, 3, or their equivalents AUX, AUX2,
  4853. AUX3.
  4854.  
  4855. SET TERMINAL COLOR: Instead of specifying colors by number, the words BLUE,
  4856. RED, MAGENTA, GREEN, CYAN, YELLOW, or WHITE are appropriate.  This is the
  4857. color of the text in connect mode; background colors are not available.
  4858. Monochrome monitors will respond with display changing from most dim to most
  4859. bright if the colors are specified in the order given.
  4860.  
  4861. SET TERMINAL KEYCLICK: Not implemented in Kermit; use the NEC provided command.
  4862.  
  4863. SET TERMINAL SCREEN-BACKGROUND: Not implemented.
  4864.  
  4865. During terminal emulation, screen scroll is handled by the PgUp and PgDn keys.
  4866. If used in combination with the Ctrl key, the display moves but one line.  If
  4867. used in combination with the Fnc key, the display scrolls to the end of the
  4868. buffer.  The Fnc-INS combination toggles the mode line on/off.  The Fnc-DEL
  4869. combination toggles the terminal emulation type.  The Fnc-Break combination
  4870. resets the emulator.  The Help key pulls down the connect mode menu.  The ANSI
  4871. escape sequence for disable/enable cursor is implemented.
  4872.  
  4873. @section<Compatibility with Older Versions of MS-DOS Kermit>
  4874. @label<-msdiffs>
  4875.  
  4876. The last monolithic (single source file) release of MS-DOS Kermit was 1.20.
  4877. Meanwhile, implementations based on versions of that vintage will have at least
  4878. the following incompatibilies from the version described here:
  4879. @begin<itemize,spread 0>
  4880. "RECEIVE filespec" is used instead of "GET filespec".  There is no GET
  4881. command in older versions, and no way to specify a new name for an
  4882. incoming file.
  4883.  
  4884. No LOCAL or REMOTE commands.
  4885.  
  4886. No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
  4887.  
  4888. No TAKE or initialization files.
  4889.  
  4890. No command macros or command line arguments.
  4891.  
  4892. No terminal session logging.
  4893. @end<itemize>
  4894. and others, depending on the specific version.
  4895.  
  4896. Incompatibilities between 2.29 and later releases include:
  4897. @begin<itemize,spread 0>
  4898. LOCAL command has been removed from 2.30 and later.
  4899.  
  4900. CLEAR command now means clear serial port buffer rather than key and macro
  4901. definitions.  Key and macro definition string space is now garbage collected,
  4902. so a CLEAR command for them is no longer necessary.
  4903.  
  4904. CLRINP command is gone (replaced by CLEAR).
  4905.  
  4906. Numbers of the form \@i<nnn> default to decimal rather than octal.
  4907.  
  4908. Status of Default Disk is now shown as default disk and path.
  4909.  
  4910. LOG @i<filespec> replaced by LOG SESSION @i<filespec> and LOG PACKET
  4911. @i<filespec>.
  4912.  
  4913. SET KEY and SHOW KEY commands use different key identifications and syntax:
  4914. @end<itemize>
  4915. MS-Kermit no longer understands keycap names such as F1 and BACKSPACE because
  4916. the codes are now highly dependent on individual keyboards, software, and
  4917. computers.  Also, not every key press combination is supported by the system
  4918. software and key codes do depend on the keyboard in use.  Thus, the SHOW KEY
  4919. command is normally used to obtain codes for keys on your system.  In most
  4920. cases, defining one key also redefines all other keys sending the same
  4921. character.  This is a side effect of not knowing the physical details of every
  4922. keyboard.  However, efforts have been made to recognize many such "aliased"
  4923. keys and to generate unique identifications for each. Special keys, such as F1,
  4924. F2 and others which do not send an ASCII code are usually unique and are
  4925. identified by scan codes.
  4926.  
  4927. Previous versions of MS Kermit used a different key coding algorithm and not
  4928. all old codes map to the expected keys.  However, Kermit does attempt to use
  4929. the older SET KEY syntax properly as much as possible.  The older syntax
  4930. required the keyword SCAN followed by a number WITHOUT the BACKSLASH.  The
  4931. current MS Kermit uses decimal as the default number base and previous
  4932. versions used octal in certain commands.  So, when Kermit senses an old style
  4933. SET KEY command it converts the number, displays the new format and gives a
  4934. warning message.  It is best to make a new style SET KEY file.
  4935.  
  4936. @Section(What's Missing)
  4937.  
  4938. Kermit-MS has plenty of room for improvement.  Missing features (which may be
  4939. added in future releases) include:
  4940. @begin(itemize, spread 0)
  4941. Sliding window transport protocol.
  4942.  
  4943. Default filetype for TAKE command files.
  4944.  
  4945. Passing paramaters in TAKE command, like in DO command. 
  4946.  
  4947. A way to send files with their full path names.
  4948.  
  4949. A way to play back session logs directly from disk to screen.
  4950.  
  4951. Trapping of carrier loss during CONNECT or file transfer.
  4952.  
  4953. A better built-in help facility.
  4954.  
  4955. A way to dump or print Tektronix graphics screens.
  4956. @end(itemize)
  4957.  
  4958. @Section<Installation of Kermit-MS>
  4959. @index<Bootstrapping MS-DOS Kermit>
  4960.  
  4961. If you already have Kermit on your PC, you can use it to obtain new versions of
  4962. Kermit-MS when they appear on the central system at your site.  If you do not
  4963. have Kermit or any other reliable file capture facility on your PC, you can
  4964. order a Kermit diskette from Columbia (write to Kermit Distribution, Columbia
  4965. University Center for Computing Activities, 612 West 115th Street, New York, NY
  4966. 10025, USA, for information), or from any of a number of user groups or
  4967. diskette services.  If you don't have Kermit already, and absolutely can't get
  4968. a Kermit diskette, but have access to another computer that has a copy of the
  4969. MS-DOS Kermit program (usually in @qq<.BOO> format, explained below), there are
  4970. two recommended methods for getting it onto your PC:
  4971. @begin(enumerate,spread 0.5)
  4972. Use another file capture facility to get it.
  4973.  
  4974. Type in and run the "baby Kermit" program (72 lines) from chapter 7 of the
  4975. Kermit book.
  4976. @end(enumerate)
  4977. The first method involves either "raw capture" (no error checking), or else
  4978. use of another protocol, such as Xmodem@index<Xmodem>, which, like Kermit,
  4979. requires a program to execute the same protocol on both ends of the
  4980. connection.
  4981.  
  4982. Raw capture generally involves "typing" the file on the other computer, with
  4983. your PC taking the place of the terminal, and rather than displaying the file
  4984. on the screen as it's being typed, your PC is storing it on the disk.  This is
  4985. a tricky process, however, because data can easily be lost or corrupted.  For
  4986. instance, you could write a very short BASIC program to capture a file in this
  4987. way, but it could probably not keep up -- even at low baud rates -- with the
  4988. transmission speed unless you included the tricky serial port BASIC commands.
  4989. The DOS command COPY COM1 @i<filename> command has the same speed problem, and
  4990. it stops only when it receives a Control-Z character from the other computer.
  4991.  
  4992. If the other computer has Kermit on it -- which is likely, since this is
  4993. probably the reason you want to get Kermit onto your PC -- you should type in
  4994. the receive-only BASIC Kermit program listed on pp.186-188 of the Kermit book,
  4995. and then use it in conjunction with the other computer's Kermit to transfer
  4996. the file.  Make sure to set a long enough delay on the other computer to give
  4997. yourself time to escape back to the PC and start up the "baby Kermit" before
  4998. packets start to arrive, otherwise you'll probably get fatal DOS i/o errors.
  4999.  
  5000. Note that Kermit programs are often distributed under names other than
  5001. "Kermit".  The Columbia Kermit program library contains hundreds of Kermit
  5002. programs, which must be given unique names.  MS-DOS Kermit for the IBM PC, for
  5003. instance, is called @q<MSVIBM>.  Once you have this program in
  5004. @q<.EXE> format on your disk, you probably should rename it to @q<KERMIT.EXE>,
  5005. because the distribution name is harder to remember (and type).
  5006.  
  5007. You will probably also want to create an MS-Kermit initialization file.
  5008. A sample is distributed with MS-Kermit as @q<MSVIBM.INI>.  This should be
  5009. tailored to your requirements, and then renamed to @q<MSKERMIT.INI>, and
  5010. stored where Kermit can find it (in the current directory or any directory
  5011. in your DOS PATH).
  5012.  
  5013. @subheading<".BOO Files">
  5014.  
  5015. @index<.BOO Files>
  5016. MS-Kermit (and many other Kermit programs) are often distributed using a
  5017. special encoding called "boo" (short for "bootstrap") format, developed
  5018. especially for distribution of MS-Kermit over networks and communication lines.
  5019. MS-Kermit has grown to have so many features that the binary program image
  5020. (the @q<.EXE> file) has become quite large.  But binary files are generally
  5021. not compatible with the common labeled tape formats (e.g. ANSI D), electronic
  5022. mail, or raw downloading -- the methods most commonly used for Kermit
  5023. distribution.
  5024.  
  5025. A common practice is to encode @q<.EXE> and other binary files into printable
  5026. characters, such as hexadecimal digits, for transportability.  A simple "hex"
  5027. encoding results in two characters per 8-bit binary byte, plus CRLFs added
  5028. every 80 (or less) hex characters to allow the file to pass through
  5029. card-oriented links.  A hex file is therefore more than twice as large as
  5030. the original binary file.
  5031.  
  5032. A @q<.BOO>@index(.BOO Files)@index(BOO Files) file is a more compact, but
  5033. somewhat more complicated, encoding.  Every three binary bytes (24 bits) are
  5034. split up into four 6-bit bytes with 48 (ASCII character @qq<0>) added to
  5035. each, resulting in four ASCII characters ranging from @qq<0> (ASCII 48) to
  5036. @qq<o> (ASCII 111), with CRLFs added at or near "column 76".  The resulting
  5037. file size would therefore be about 4/3 the @q<.EXE> file size.  This is still
  5038. quite large, so @q<.BOO> files also compress consecutive null (zero) bytes.  Up
  5039. to 78 consecutive nulls are compressed into two characters.  Tilde (@qq<~>) is
  5040. the null-compression lead-in, and the following character indicates how many
  5041. nulls are represented (subtract 48 from this character's ASCII value).  For
  5042. instance @qq<~A> means 17 consecutive nulls; @qq<~~> means 78 of them.
  5043. Repeated nulls are very common in @q<.EXE> files.
  5044.  
  5045. 4-for-3 encoding combined with null compression reduces the size of the encoded
  5046. file to approximately the same size as the original @q<.EXE file>, and
  5047. sometimes even smaller.  The first line of a @q<.BOO> file is the name (in
  5048. plain text) of the original file.  Here's what the first few lines of a typical
  5049. @q<.BOO> file look like:
  5050. @begin<example,leftmargin +2,rightmargin 0>
  5051. MSVIBM.EXE
  5052. CEYP0Id05@@0P~3oomo2Y01FWeP8@@007P000040HB4001`W~28bL005\W~2JBP00722V0ZHPYP:
  5053. \8:H2]R2V0[`PYP:68>H2S23V0YHPiP:Xg800;Qd~2UWD006Yg~2Ogl009]o~2L8000;20~~~~
  5054. ~~~~~~~:R2H008TV?P761T410<H6@@P40j4l6RRH0083l17@@PP?`1M@@?YSP20o0Ee0nUD0h3l
  5055. 1WD3jO@@3]0VjW03=8L?X4`N0o01h1\H6~20l>0i7n0o1]e7[@@2\PO=8LH60@@00Raj>04^97Xh0
  5056. @end<example>
  5057.  
  5058. @Subheading<Programs for Handling .BOO Files>
  5059.  
  5060. Kermit Distribution includes several useful @q<.BOO>-file programs:
  5061. @begin<description>
  5062. @q<MSBPCT.BAS>@\This Microsoft BASIC program can be used on any PC that has
  5063. BASIC to decode a @q<.BOO> file into an @q<.EXE> file.  It's about 50 lines
  5064. line, so it can be typed in.
  5065.  
  5066. @q<MSBPCT.BOO>@\BASIC programs run rather slowly, so @q<.BOO>-file decoders
  5067. have also been written in high-level languages like C.  The @q<MSBPCT.EXE> file
  5068. that was produced by compiling @q<MSBPCT.C> is encoded into @q<MSBPCT.BOO>,
  5069. which can be decoded back into @q<MSBPCT.EXE> using @q<MSBPCT.BAS>.  Once
  5070. you've done that, you don't need to run the slow BASIC version any more, which
  5071. is a blessing, because the MS-Kermit @q<.BOO> file takes up to half an hour to
  5072. decode using the BASIC version (depending on the system), but only seconds
  5073. using @q<MSBPCT.EXE>.
  5074.  
  5075. @q<MSBPCT.*>@\There are @q<.BOO>-file decoders written in other languages too,
  5076. like assembler, Turbo Pascal, Fortran, etc.  Take your pick.  They all do the
  5077. same thing.
  5078.  
  5079. @q<MSBMKB.*>@\This is the program for encoding an @q<.EXE> file into a @q<.BOO>
  5080. file.  It is written in C, compiled, and translated (by itself) into @q<.BOO>
  5081. format, suitable for decoding back into @q<.EXE> form by any of the MSBPCT
  5082. programs.  Also in other languages, including Fortran and Turbo Pascal.
  5083. @end<description>
  5084. @q<MSBHEX.*> are C programs for producing and decoding straight hex files.
  5085.  
  5086. @Section<Program Organization>
  5087.  
  5088. Kermit-MS version 2 is composed of separate assembler source files, assembled
  5089. separately, and linked together.  The modules are:
  5090.  
  5091. @i(System/Device Independent:)
  5092. @begin(description,spread 0)
  5093. @Q(MSSKER.ASM)@\Main program
  5094.  
  5095. @Q(MSSSEN.ASM)@\File sender
  5096.  
  5097. @Q(MSSRCV.ASM)@\File receiver
  5098.  
  5099. @Q(MSSSER.ASM)@\Server operation
  5100.  
  5101. @Q(MSSFIL.ASM)@\File i/o
  5102.  
  5103. @Q(MSSCMD.ASM)@\Command parser
  5104.  
  5105. @Q(MSSTER.ASM)@\CONNECT command
  5106.  
  5107. @Q(MSSCOM.ASM)@\Packet reader and sender
  5108.  
  5109. @Q(MSSSET.ASM)@\SET, SHOW, and STATUS commands
  5110.  
  5111. @Q(MSSSCP.ASM)@\Script CLEAR, ECHO, INPUT, OUTPUT, PAUSE, TRANSMIT commands
  5112.  
  5113. @Q(MSSFIN.ASM)@\Dummy module for the end of the data segment;
  5114. must be linked LAST.
  5115.  
  5116. @Q(MSSDEF.H)@\Data structure definitions and equates
  5117. @end(description)
  5118. @i(System/Device Dependent:)
  5119. @begin(description,spread 0)
  5120. @Q(MSG@i<xxx>.ASM)@\System-dependent graphics terminal for system @i(xxx)
  5121.  
  5122. @Q(MSU@i<xxx>.ASM)@\System-dependent keyboard translator for system @i(xxx)
  5123.  
  5124. @Q(MSX@i<xxx>.ASM)@\System-dependent code for system @i(xxx)
  5125.  
  5126. @Q(MSY@i<xxx>.ASM)@\Terminal emulation for system @i(xxx)
  5127.  
  5128. @Q(MSZ@i<xxx>.ASM)@\More terminal emulation for system @i(xxx)
  5129. @end(description)
  5130.  
  5131. The @i(xxx) is replaced by a 3-letter code for the particular system,
  5132. e.g. IBM for the IBM PC family, RB1 for the Rainbow-100, etc.
  5133.  
  5134. The modular organization allows easier modification of the program, quicker
  5135. transfer of modified portions from system-to-system.  The modules are designed
  5136. to be well-defined and self-contained, such that they can be easily replaced.
  5137. For instance, someone who prefers windows and mice to typing commands should be
  5138. able to replace the command parsing module without having to worry about the
  5139. effect on the other modules.
  5140.  
  5141. To assemble any of the Kermit modules, file @q(MSSDEF.H) must be on the
  5142. default disk.
  5143.  
  5144. All the Kermit implementations require the modules MSSCMD, MSSCOM, MSSFIL,
  5145. MSSKER, MSSRCV, MSSSCP, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN.  MSSFIN
  5146. @i<must> be linked last.
  5147.  
  5148. Each particular implementation requires at least an MSX@i<xxx> module, usually
  5149. an MSU@i<xxx> module, and, if it is doing terminal emulation in software, also
  5150. an MSY@i<xxx> and possible also an MSZ@i<xxx> module, and for graphics terminal
  5151. emulation, also an MSG@i<xxx> module.  See the batch or make files from the
  5152. source distribution for details of exactly which modules are required for a
  5153. particular implementation.
  5154.  
  5155. Once all the required object modules exist, they may be linked together
  5156. to produce a Kermit program.  For example, on the IBM PC:
  5157. @begin(example,group,leftmargin +2)
  5158. A>@ux(link)
  5159.  
  5160.    Microsoft Object Linker V2.00
  5161. (C) Copyright 1982 by Microsoft Inc.
  5162.  
  5163. Object Modules [.OBJ]: @ux(msscmd+msscom+mssfil+mssker+mssrcv+mssscp+msssen+)
  5164. @ux(mssser+mssset+msster+msgibm+msuibm+msxibm+msyibm+mszibm+mssfin)
  5165. Run File [MSSCMD.EXE]: @ux(kermit)
  5166. List File [NUL.MAP]:;
  5167.  
  5168.     A>
  5169. @end<example>
  5170.  
  5171. Warning: old versions of MASM@index<MASM> may not be able to assemble several
  5172. of the large files now present in Kermit-MS.  The solution is to acquire
  5173. Microsoft MASM 4.0 or later.
  5174.  
  5175. @section<Bringing Kermit to New Systems>
  5176.  
  5177. You can bring Kermit-MS to MS-DOS systems that are not explicitly supported in
  5178. one of two ways -- attempt to run the "generic"@index<Generic MS-DOS Kermit>
  5179. MS-DOS Kermit on it, or add explicit code to support your system.
  5180.  
  5181. To get started with Kermit on a new system, try running "generic" MS-DOS
  5182. Kermit; in many cases, it will run as is.  The generic version accomplishes
  5183. all its port and console i/o through DOS calls, and during terminal
  5184. connection does not attempt to emulate any particular kind of terminal.  In
  5185. some cases, the generic version may still require some fiddling to run on a
  5186. new system; for instance, different systems refer to their communication
  5187. ports in different ways -- COM1, J1, AUX, etc.  The SET PORT command allows
  5188. you to specify the port using any of these device names, or using DOS file
  5189. handles -- keep trying until you find the one that works.  Generic MS-DOS
  5190. Kermit will probably run no faster than 1200 baud, and it only works with
  5191. DOS 2.0 or later.
  5192.  
  5193. If you want to write code to explicitly support a new system, first call or
  5194. write Kermit Distribution at Columbia to make sure no one else is already doing
  5195. the same work.  If you're the first, then begin by reading the file
  5196. @q<MSXAAA.DOC>, provided with the MS-DOS Kermit sources in the Kermit
  5197. distribution, which is a guide to the system dependent modules of Kermit-MS.
  5198. Then create new @q<MSU>@i<xxx>@q<.ASM> and @q<MSX>@i<xxx>@q<.ASM> modules, and,
  5199. if your version is also doing terminal emulation in software, also an @q<MSY>
  5200. and possibly an @q<MSZ> module patterned after those that have been written
  5201. for other systems.
  5202.  
  5203. @newpage()
  5204. @section<Kermit-MS VT102 Terminal Emulator Technical Summary>
  5205.  
  5206. @subsection(Treatment of Inbound Characters During Terminal Emulation)
  5207.  
  5208. @label(-termcodes)
  5209. @index<VT102 Emulation>@index<VT52 Emulation>@index<Heath/Zenith-19 Emulation>
  5210. The following sections summarize the Kermit-MS keyboard and screen operation
  5211. during emulation of H19, VT52, and VT102 terminals, prinicipally for the IBM PC
  5212. but also used by the NEC APC3, Victor 9000, and Sanyo 55x systems.
  5213.  
  5214. Many things can happen to a character that arrives at the communication port
  5215. before you see it.  The sequence of events for version 2.32 is summarized in
  5216. the following picture.  2.31 is similar except for no national characters.
  5217.  
  5218. @case[device,
  5219. postscript="@begin<example,leftmargin 0,rightmargin 0,size -1,free>",
  5220. else="@begin<example,leftmargin 0,rightmargin 0,free>"]
  5221. @bar()
  5222.                 character from serial port or network
  5223.                                 |
  5224.                                 v
  5225.                         NUL: discard unless DEBUG is ON
  5226.                         DEL: discard unless DEBUG is ON or doing Tektronix
  5227.                                 |
  5228.                         character available to rest of Kermit
  5229.                                 |
  5230.                                 v
  5231.         TERMINAL NONE   <-------*-------*---> to packet reader
  5232.         DISPLAY 8-BIT?          |       |
  5233.         Yes     No              v       v
  5234.         |       |               |       |
  5235.         |       remove 8-th bit |       Script routines.
  5236.         |       |               |       remove parity bit, if parity used.
  5237.         ---------               |       apply SET TRANSLATION INPUT table,
  5238.         |                       |        if active.
  5239.         apply SET TRANSLATION   |       |
  5240.         INPUT, if active        |       LOG SESSION active?
  5241.         |                       |       No      Yes
  5242.         copy char to printer?   |       |       |
  5243.         No      Yes             |       |       DEBUG ON or DISPLAY 8-BIT?
  5244.         |       |               |       |       Yes     No
  5245.         |       print char      |       |       |       |
  5246.         |       via DOS         |       |       |       remove 8-th bit
  5247.         |       |               |       |       |       |
  5248.         ---------               |       |       ---------
  5249.         |                       |       |           |
  5250.         log char if             |       |           |
  5251.         LOG SESSION active.     |       |           |--> log character
  5252.         |                       |       v           v
  5253.         v                       |       -------------
  5254.     DEBUG ON?                   |               |
  5255.     No    Yes                   |       DISPLAY 8-BIT?
  5256.     |     |                     |       Yes     No
  5257.     |   show chars, with                |       |       |
  5258.     |   tilde/caret modifiers   |       |       remove 8-th bit
  5259.     |     |                     |       |       |
  5260.     |   Exit                    |       v       v
  5261.     |                           |       -------------> character to scripts
  5262.     display char via DOS        |
  5263.     Exit                        |
  5264.                                 v
  5265.                         VT102 terminal emulator
  5266.                                 |
  5267.                            SET DEBUG ON?
  5268.                                 No      Yes --> display characters:
  5269.                                 |               show leading tilde if bit 8
  5270.                                 |               set; for lower 7 bits show
  5271.                                 |               caret-char if Control code.
  5272.                                 |               |
  5273.                                 |               Exit.
  5274.                                 v
  5275.                 Printing Transparently? (ESC [ 4/5 i)
  5276.                 No              Yes
  5277.                 |               |
  5278.                 |               log character if LOG SESSION is active,
  5279.                 |               send char to printer but not to screen.
  5280.                 |               |
  5281.                 |               Exit.
  5282.                 v
  5283.         SET DISPLAY 8-BIT?
  5284.         Yes             No
  5285.         |               |
  5286.         |       remove 8-th bit of character
  5287.         |               |
  5288.         v               v
  5289.         -----------------
  5290.                 |
  5291.                 v
  5292.         Control character?
  5293.         Yes             No
  5294.         |               |
  5295.         |               Doing escape sequence?
  5296.         |               No              Yes
  5297.         |               |               |
  5298.         v               v               |
  5299.         -----------------               |
  5300.                 |                       |
  5301.                 v                       |
  5302.         do SET TRANSLATION INPUT,       |
  5303.         if active.                      |
  5304.         |                               v
  5305.         ---------------------------------
  5306.                         |
  5307.                         v
  5308.                  NUL or DEL character?
  5309.                         No      Yes --> Exit (discard)
  5310.                         |
  5311.                         |
  5312.                 log character if LOG SESSION is active.
  5313.                         |
  5314.                 Control character?
  5315.                 Yes             No
  5316.                 |               |
  5317.           do control ops        map character according to
  5318.                 |               active character-set pointer. (See below)
  5319.                 Exit            |
  5320.                                 display character on screen
  5321.                                 (with double width/height, if req'd).
  5322.                                 |
  5323.                                 print character via DOS if
  5324.                                 Controller Print is active (ESC [ ? 4/5 i)
  5325.                                 or if Kermit copy screen to printer active.
  5326.                                 |
  5327.                                 v
  5328.                                 Exit
  5329. @bar()
  5330. @end<example>
  5331.  
  5332. Updating of the cursor position is automatic and can be influenced by the
  5333. Kermit command SET TERMINAL DIRECTION {RIGHT-TO-LEFT | LEFT-TO-RIGHT}.
  5334. As a convenience, the keyboard left and right arrow keys are interchanged
  5335. when the writing direction is reversed; thus, the right arrow always requests
  5336. the host to move the cursor to the visual right.
  5337.  
  5338. The active character-set pointer is determined by two conditions:
  5339. @begin<enumerate>
  5340. The VT102 maintains two character set pointers (selectors), G0 and G1.
  5341. G0 is the default pointer. Reception of Control-O selects the G0 pointer,
  5342. Control-N selects the G1 pointer.
  5343.  
  5344. Which character set: US-ASCII, UK-ASCII, ALTERNATE-ROM, or line-drawing,
  5345. has been assigned to G0 and G1 pointers.  The command
  5346. SET CHARACTER-SET {US-ASCII, UK-ASCII, ALTERNATE-ROM}
  5347. assigns that set to the G0 AND G1 pointers. Similarly, the host can
  5348. assign any of the four sets to either G0 OR G1 via the escape sequences
  5349. @q<ESC ( @i[char]>  or  @q<ESC ) @i[char]>, respectively, as summarized below:
  5350. @end<enumerate>
  5351. @begin<example>
  5352. ESC ( A     @r<G0 points to UK symbols (ASCII with Pound Sterling sign)>
  5353. ESC ) A     @r<G1 points to UK symbols>
  5354. ESC ( B     @r<G0 points to ASCII symbols (ASCII with US pound sign #)>
  5355. ESC ) B     @r<G1 points to ASCII symbols>
  5356. ESC ( 0     @r<G0 points to special (line drawing) graphics>
  5357. ESC ) 0     @r<G1 points to special (line drawing) graphics>
  5358. ESC ( 1     @r<G0 points to ALTERNATE-ROM national characters>
  5359. ESC ) 1     @r<G1 points to ALTERNATE-ROM national characters>
  5360. ESC ( 2     @r<G0 points to special (line drawing) graphics>
  5361. ESC ) 2     @r<G1 points to special (line drawing) graphics>
  5362. @end<example>
  5363.  
  5364. All character sets produce
  5365. @begin<example>
  5366. !"  pound-sign  $%&'()*+,-./0123456789:;<=>?
  5367. @@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  5368. @end<example>
  5369. The lower case field, @q<`ab..yz{|}~> changes to line drawing or national
  5370. characters, depending on the character set. National characters replace the
  5371. character codes 60h to 7Ah (accent grave, lower case a-z) with codes 80h to
  5372. 9Ah; lower case a becomes umlated u, etc in standard IBM display adapters.
  5373.  
  5374. @b<DOS Code Page support>
  5375.  
  5376. @index<Code Page>Code Pages are sets of translation tables maintained within
  5377. DOS to support national languages. They affect the characters reported by the
  5378. keyboard and those displayed on the screen and printer. Code Page support is
  5379. loaded as device driver information in CONFIG.SYS and activated by DOS
  5380. programs NLSFUNC, CHCP, KEYB, and MODE, at least under PC DOS 3.30.  An EGA
  5381. adapter is required for screen support; similarly, only IBM printers are
  5382. discussed.  Making Code Pages operate is not exactly easy, and there have been
  5383. rumors that MS-DOS Code Pages from various vendors are not bug free.  However,
  5384. the goal is an ability to change translations for screen, keyboard, and
  5385. printer by DOS commands.
  5386.  
  5387. Since Code Pages are the province of DOS it is clear that operations at the
  5388. Bios or hardware levels will not experience Code Pages.  Kermit uniformly
  5389. uses DOS for printer output.  Kermit CONNECT mode keyboard reading is normally
  5390. done via the Bios, unless SET KEY OFF has been stated.  Kermit CONNECT mode
  5391. Screen reading and writing is done via both the Bios and the hardware for the
  5392. VT102/VT52/Tek4010 emulators, but the terminal type of NONE uses only DOS.
  5393. Thus, full Code Page support is available in Kermit by stating SET KEY OFF
  5394. (use DOS) and SET TERMINAL NONE (use DOS).  Outside of CONNECT mode all Kermit
  5395. screen and keyboard input and output is done through DOS.
  5396.  
  5397. @newpage()
  5398. @subsection<Keyboard Layout and Characters Sent>
  5399. @label<-mslayout>
  5400.  
  5401. Here is how the keypad functions are assigned to the IBM keyboard function
  5402. keys.  You may change them by using the SET KEY command to define a desired key
  5403. as the appropriate Kermit action verb; use SET KEY without a definition to
  5404. undefine a key.  Names of appropriate verbs are also shown for use in the Set
  5405. Key command, such as
  5406. @begin<example>
  5407. Set Key \2352 \Kbreak           @r<(IBM Alt-B assigned to verb BREAK)>
  5408. @end<example>
  5409.  
  5410. Verb names are system dependent, use @q<?> in the Set Key definition part for a
  5411. list of local verbs.  IBM PC verbs are listed in Table @ref<-kverbs>; IBM key
  5412. values are either straight ASCII or the IBM Bios scan code, plus 256, plus 512
  5413. for Shift key held down, plus 1024 for Control key held down, plus 2048 for Alt
  5414. key held down; non-ASCII keys are always 256 decimal or greater.  Keys
  5415. particular to the Enhanced Keyboard have 4096 added to the result.
  5416.  
  5417. @begin(example,leftmargin 0,group)
  5418. @bar()
  5419.  
  5420.     Heath-19 and VT52 Keypads                 VT102 keypad
  5421.        IBM Keys                                 IBM keys
  5422. +------+------+-------+----------+   +------+------+------+------+
  5423. | Blue |  Red |  Grey | up arrow |   |  PF1 |  PF2 |  PF3 |  PF4 |
  5424. |  F1  |  F2  |  F3   | up arrow |   |  F1  |  F2  |  F3  |  F4  |
  5425. +------+------+-------+----------+   +------+------+------+------+
  5426. |  7   |  8   |  9    |down arrow|   |  7   |  8   |  9   |  -   |
  5427. |  F5  |  F6  |  F7   |down arrow|   |  F5  |  F6  |  F7  |  F8  |
  5428. +------+------+-------+----------+   +------+------+------+------+
  5429. |  4   |  5   |  6    | rgt arrow|   |  4   |  5   |  6   |  ,   |
  5430. |  F9  |  F10 |  SF1  | rgt arrow|   |  F9  |  F10 |  SF1 |  SF2 |
  5431. +------+------+-------+----------+   +------+------+------+------+
  5432. |  1   |  2   |  3    |left arrow|   |  1   |  2   |  3   |  E   |
  5433. |  SF3 |  SF4 |  SF5  |left arrow|   |  SF3 |  SF4 |  SF5 |  n  S|
  5434. +------+------+-------+----------+   +------+------+------+  t  F|
  5435. |  0------0   |  .    |  Enter   |   |  0------0   |  .   |  e  6|
  5436. |  SF7        |  SF8  |  SF6     |   |   SF7       |  SF8 |  r   |
  5437. +-------------+-------+----------+   +-------------+------+------+
  5438.  
  5439. @i(SF1 means push Shift and F1 keys simultaneously)
  5440. @bar()
  5441. @end(example)
  5442.  
  5443. @begin(verbatim,leftmargin 1)
  5444. @i(CURSOR KEYS:)
  5445.                                       H-19 & VT52           VT102
  5446. VT52/H19 key   IBM Verb  IBM key       All Modes      Numeric   Application
  5447.  
  5448. up arrow       UPARR    up arrow       ESC A          ESC [ A   ESC O A
  5449. down arrow     DNARR    down arrow     ESC B          ESC [ B   ESC O B
  5450. right arrow    RTARR    right arrow    ESC C          ESC [ C   ESC O C
  5451. left arrow     LFARR    left arrow     ESC D          ESC [ D   ESC O D
  5452.  
  5453. @i<AUXILIARY KEYPAD:>
  5454.                                      Heath-19 & VT52         VT102
  5455. VT52/H19 key   IBM Verb  IBM key     Numeric Applic.   Numeric   Applic.
  5456.  
  5457. PF1/HF7/Blue   GOLD,PF1   F1         ESC P   ESC P     ESC O P   ESC O P
  5458. PF2/HF8/Red    PF2        F2         ESC Q   ESC Q     ESC O Q   ESC O Q
  5459. PF3/HF9/Grey   PF3        F3         ESC R   ESC R     ESC O R   ESC O R
  5460. PF4/HF1        PF4        F4         ESC S   ESC S     ESC O S   ESC O S
  5461. 0              KP0        SF7        0       ESC ? p   0         ESC O p
  5462. 1              KP1        SF3        1       ESC ? q   1         ESC O q
  5463. 2              KP2        SF4        2       ESC ? r   2         ESC O r
  5464. 3              KP3        SF5        3       ESC ? s   3         ESC O s
  5465. 4              KP4        F9         4       ESC ? t   4         ESC O t
  5466. 5              KP5        F10        5       ESC ? u   5         ESC O u
  5467. 6              KP6        SF1        6       ESC ? v   6         ESC O v
  5468. 7              KP7        F5         7       ESC ? w   7         ESC O w
  5469. 8              KP8        F6         8       ESC ? x   8         ESC O x
  5470. 9              KP9        F7         9       ESC ? y   9         ESC O y
  5471. comma  (,)     KPCOMA     SF2        ,       ESC ? l   ,         ESC O l
  5472. minus  (-)     KPMINUS    F8         -       ESC ? m   -         ESC O m
  5473. period (.)     KPDOT      SF8        .       ESC ? n   .         ESC O n
  5474. Enter          KPENTER    SF6        ^M(cr)  ESC ? M   ^M        ESC O M
  5475.  
  5476. @i<(SFn means hold down Shift key while pressing Function key n.)>
  5477. @end<verbatim>
  5478.  
  5479. An often confusing item is knowing the mode of the auxillary keypad: numeric
  5480. or application.  Digital Equipment Corporation designed the terminal to change
  5481. modes only under command from the remote computer and not at all from the
  5482. keyboard.  So the startup state is numeric/cursor mode, and reception of escape
  5483. sequences @qq<ESC [ ? 1 h> or @qq<l> changes the mode.  Kermit verbs for the
  5484. keypad and cursor keys generate the correct escape sequences appropriate to
  5485. the current mode and terminal type.
  5486.  
  5487. A best attempt is made to safely test for the 101/102 key Enhanced keyboard
  5488. and use it if present.  If it is present then the keyboard translator separates
  5489. the individual arrow keys from those on the numeric keypad and also separates
  5490. the asterisk and forward slash keys on the keypad from those on the regular
  5491. typewriter keyboard.  These special Enhanced keyboard keys are reported as scan
  5492. codes with 4096 added to the base scan code.
  5493.  
  5494. @begin<verbatim,leftmargin 1>
  5495. @i<OTHER IBM KEYS OPERATIONAL IN CONNECT MODE:>
  5496.  
  5497. IBM key         IBM Verb      Action
  5498.  
  5499. Keypad Del                    Send ASCII Del code (rubout) \127
  5500. Backspace (<-)                Send ASCII Del code (rubout) \127  (BS is \8)
  5501. Keypad -        MODELINE      Toggle mode line on/off (only if Mode Line is
  5502.                               enabled and not used by the host).
  5503. Alt -           TERMTYPE      Toggle among H-19, VT52, and VT100 emulations.
  5504. Alt =           RESET         Clear screen and reset terminal emulator to
  5505.                               starting (setup) state.
  5506. Alt B           BREAK         Send a BREAK signal
  5507. Alt H           HELP          Show drop down help menu (detailed below)
  5508. Alt S           STATUS        Show settings
  5509. Alt X           EXIT          Exit Connect mode, back to Kermit prompt
  5510.  
  5511. Home            HOMSCN        Roll screen up (text down) to beginning of
  5512.                                storage.
  5513. End             ENDSCN        Roll screen down (text up) to end of storage.
  5514. PgUp            UPSCN         Roll screen up (back, earlier) one screen.
  5515. PgDn            DNSCN         Roll screen down (forward, later) one screen.
  5516. Ctrl-PgUp       UPONE         Roll screen up one line.
  5517. Ctrl-PdDn       DNONE         Roll screen down one line.
  5518.  
  5519. Control PrtSc   PRTSCN        Toggle  on/off copying of received text to
  5520.                               printer, "PRN" shows on far right of mode
  5521.                               line when activated.
  5522.  
  5523. Control-End     DUMP          Dump image of screen to a disk file or device.
  5524.                               Default filename is KERMIT.SCN in the current
  5525.                               directory. Use command SET DUMP to change the
  5526.                               filename.  Screen images are appended to the
  5527.                               file, separated by formfeeds.
  5528.  
  5529. Shift-PrtSc     Standard DOS Print-screen, dump screen image to printer.
  5530.  
  5531. unassigned      HOLDSCRN      DEC style Holdscreen, same as typing Control-S.
  5532. @end<verbatim>
  5533.  
  5534. "@q<Alt ->" means hold down Alt and type minus on the upper key rank.  This
  5535. switches among the various kinds of emulation but does not change most
  5536. operating parameters of the emulator.
  5537.  
  5538. @i<CONNECT ESCAPE COMMANDS:>
  5539.  
  5540. Type the Kermit escape character (normally @qq<^]>), then one of the keys
  5541. below:
  5542. @begin<verbatim,leftmargin 1>
  5543.                                                         (equivalent IBM Verb)
  5544.     ?   display this short list.                                HELP
  5545.     0   send a null character.                                  NULL
  5546.     B   send a BREAK signal.                                    BREAK
  5547.     C   close connect session & return to Kermit prompt.        EXIT
  5548.     F   dump screen to filespec, default is KERMIT.SCN.         DUMP
  5549.     H   hangup the phone or network connection                  HANGUP
  5550.     L   send a Long BREAK signal                                LBREAK
  5551.     M   toggle mode line on/off.                                MODELINE
  5552.     P   push to DOS.                                            DOS
  5553.     Q   quit (suspend) logging.                                 LOGOFF
  5554.     R   resume logging.                                         LOGON
  5555.     S   show status.                                            STATUS
  5556.     Kermit escape character itself: send it to the host.
  5557. @end<verbatim>
  5558.  
  5559. @subsection<Responses To Characters Received By the Terminal Emulator>
  5560. @label<-msescchars>
  5561.  
  5562. Spaces shown between characters of escape sequences are there for ease of
  5563. reading.  The actual sequences contain no spaces.  Unknown escape sequences of
  5564. the form "ESC char" are absorbed by the emulator without further effect; longer
  5565. unknown escape sequences echo the extra characters.
  5566.  
  5567. DEC VT102 functions while in ANSI (VT102) mode, unsupported features marked by
  5568. an asterisk (*):
  5569. @begin<verbatim,leftmargin 1>
  5570. Escape Seq     Mnemonic       Description of Action
  5571.  
  5572. ESC D          IND            Index, moves cursor down one line, can scroll
  5573. ESC E          NEL            Move cursor to start of line below, can scroll
  5574. ESC H          HTS            Set one horizontal tab at current position
  5575. ESC M          RI             Reverse Index, cursor up one line, can scroll
  5576. ESC Z          DECID          Identify terminal (response is ESC [ ? 6 c)
  5577. ESC c          RIS            Reset terminal to initial state
  5578. ESC =          DECKPAM        Enter keypad application mode
  5579. ESC >          DECKNPNM       Enter keypad numeric mode
  5580. ESC 7          DECSC          Save cursor position and attributes
  5581. ESC 8          DECRC          Restore cursor from previously saved position
  5582. ESC # 3        DECDHL         Double height and width line, top half
  5583. ESC # 4        DECDHL         Double height and width line, bottom half
  5584. ESC # 5        DECSWL         Single height and width line
  5585. ESC # 6        DECDWL         Double width single height line
  5586. ESC # 8        DECALN         Test screen alignment, fill screen with E's
  5587. ESC [ Pn @@     ICH            ANSI insert Pn spaces at and after cursor
  5588. ESC [ Pn A     CUU            Cursor up Pn lines, does not scroll
  5589. ESC [ Pn B     CUD            Cursor down Pn lines, does not scroll
  5590. ESC [ Pn C     CUF            Cursor forward, stays on same line
  5591. ESC [ Pn D     CUB            Cursor backward, stays on same line
  5592. ESC [ Pn; Pn H CUP            Set cursor to row, column (same as HVP)
  5593. ESC [ Ps J     ED             Erase in display:
  5594.                                0 = cursor to end of screen, inclusive
  5595.                                1 = start of screen to cursor, inclusive
  5596.                                2 = entire screen, reset lines to single
  5597.                                    width, cursor does not move.
  5598. ESC [ Ps K     EL             Erase in line:
  5599.                                0 = cursor to end of line, inclusive
  5600.                                1 = start of line to cursor, inclusive
  5601.                                2 = entire line, cursor does not move
  5602. ESC [ Pn L     IL             Insert Pn lines preceding current line.
  5603. ESC [ Pn M     DL             Delete Pn lines from current downward, incl.
  5604. ESC [ Pn P     DCH            Delete Pn chars from cursor to left, incl.
  5605. ESC [ Pn; Pn R CPR            Cursor report (row, column), sent by terminal
  5606.                               Example: home position yields ESC [ 1; 1 R
  5607. ESC [ Pn c     DA             Device attributes (reports ESC [ ? 6 c)
  5608. ESC [ Pn; Pn f HVP            Set cursor to row, column (same as CUP)
  5609. ESC [ Ps g     TBC            Tabs clear, 0 = at this position, 3 = all
  5610. ESC [ 4 h      IRM            Insert mode on
  5611. ESC [ 20 h     LNM            Set newline mode (cr => cr/lf)
  5612. ESC [ 4 l      IRM            Replacement mode on
  5613. ESC [ 20 l     LNM            Reset newline mode (cr => cr)
  5614. ESC [ ? Ps;...;Ps h  SM       Set mode, see table below
  5615. ESC [ ? Ps;...;Ps l  RM       Reset mode, see table below
  5616.         Ps     Mnemonic       Mode           Set (h)        Reset (l)
  5617.         0                     error (ignored)
  5618.         1      DECCKM         cursor keys    application    cursor/numeric
  5619.         2      DECANM         ANSI/VT52      ANSI/VT102     VT52
  5620.         3      DECCOLM        Columns        +132 col       80 col
  5621.         4      DECSCLM       *Scrolling      smooth         jump
  5622.         5      DECSCNM        Screen         reverse video  normal
  5623.         6      DECOM          Origin         relative       absolute
  5624.         7      DECAWM         Autowrap       on             off
  5625.         8      DECARM        *Autorepeat     on             off
  5626.         9      DECINLM       *Interlace      on             off
  5627.         18     DECPFF         Printer termination character, use FF if set
  5628.         19     DECPEX         Printer extent,set=screen,off=scrolling region
  5629.         34     n/a            Invoke macro:  TERMINALS      TERMINALR
  5630.         38     n/a            Graphics (Tek) ++graphics     text
  5631.                             + See comments on EGA boards.
  5632.                            ++ Ignored if DISABLE TEK has been given.
  5633. ESC [ Pn i     MC             Printer controls (Media Copy)
  5634.         0                      Print whole Screen
  5635.         4                      Exit printer controller (transparent print)
  5636.         5                      Enter printer controller (transparent print)
  5637. ESC [ ? Pn i   MC             Printer controls (Media Copy)
  5638.         1                      Print line containing cursor
  5639.         4                      Exit auto print (stop echoing to printer)
  5640.         5                      Enter autoprint (echo screen chars to printer)
  5641. ESC [ Ps;...;Ps m  SGR        Select graphic rendition
  5642.                                0 = all attributes off (#'s 1, 4, 5, 7)
  5643.                                1 = bold, intensify foreground
  5644.                                4 = underscore (reverse video on IBM CGA)
  5645.                                5 = blink
  5646.                                7 = reverse video
  5647.                non-DEC extensions: 30-37 = foreground color = 30 + colors
  5648.                                    40-47 = background color = 40 + colors
  5649.                                    colors: 1 = red, 2 = green, 4 = blue
  5650. ESC [ Ps n     DSR            Device Status Report.
  5651.                               Response from VT100: 0=ready, 3=malfunction.
  5652.                               Command to VT100: 5=report status with DSR,
  5653.                               6=report cursor position using CPR sequence.
  5654. ESC [ Ps;...;Ps q  DECLL      Load LEDs, Ps = 0 means clear LED #1-4
  5655.                               Ps = 1,2,3,4 sets LED # 1,2,3,4 on status line.
  5656. ESC [ Pn; Pn r DECSTBM        Set top and bottom scrolling margins, resp.
  5657.                               ESC [ r resets margin to full screen.
  5658. ESC [ sol x    DECREQTPARM    Request terminal parameters, see table below
  5659. ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
  5660.                DECREPTPARM    Reports terminal parameters
  5661.                               sol = 0  request; terminal can send unsolicited
  5662.                                 reports - supported as sol = 1 below.
  5663.                               sol = 1, request; term reports only on request
  5664.                               sol = 2, this is a report (DECREPTPARM)
  5665.                               sol = 3, terminal reporting only on request
  5666.                               par = 1 none, 2 space, 3 mark, 4 odd, 5 even
  5667.                               nbits = 1 (8 bits/char), 2 (7 bits/char)
  5668.                               xspeed,rspeed = transmit & receive speed index
  5669.  0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128 correspond to speeds of
  5670.  50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200,
  5671.  and 38400 baud.              clkmul = 1 (clock rate multiplier is 16)
  5672.                               flags = 0-15 (Setup Block #5), always 0 here
  5673. ESC [ 2; Ps y  DECST          *Confidence tests - not supported
  5674.                SCS            Select character sets.
  5675. ESC ( A        SCS            G0 points to UK symbols
  5676. ESC ) A        SCS            G1 points to UK symbols
  5677. ESC ( B        SCS            G0 points to ASCII symbols
  5678. ESC ) B        SCS            G1 points to ASCII symbols
  5679. ESC ( 0        SCS            G0 points to special (line drawing) graphics
  5680. ESC ) 0        SCS            G1 points to special (line drawing) graphics
  5681. ESC ( 1        SCS            G0 points to alt char ROM - national symbols
  5682. ESC ) 1        SCS            G1 points to alt char ROM - national symbols
  5683. ESC ( 2        SCS            G0 points to alt graphics ROM - as ESC ( 0
  5684. ESC ) 2        SCS            G1 points to alt graphics ROM - as ESC ) 0
  5685.                                (Separate graphics used for DEC and Heath)
  5686. ^E             ENQ           *Answerback message (not supported)
  5687. ^G             BELL           Sound VT102 style beep
  5688. ^H             BS             Backspace, move cursor left one character
  5689. ^I             HT             Horizontal tab, move cursor to next tabstop
  5690. ^J             LF             Linefeed, move cursor down one line
  5691. ^K             VT             Vertical Tab, treated as a line feed
  5692. ^L             FF             Formfeed, treated as a line feed
  5693. ^M             CR             Carriage return, move cursor to col 1
  5694. ^N             SO             Select usage of G1 character set
  5695. ^O             SI             Select usage of G0 character set
  5696. ^X             CAN            Cancel escape sequence in progress
  5697. ^Z             SUB            Treated as a CAN
  5698.  
  5699. Other extensions:
  5700. ESC [ 25; Pc f                VT52/VT100 move cursor to 25th line.
  5701. ESC [ 25; Pc H                VT52/VT100 move cursor to 25th line.
  5702.                               (These will disable Kermit's own status line.)
  5703. ESC * char                    VT200 series graphics command, ignored.
  5704. ESC ^L                        Enter Tektronix sub-mode, clear Tek screen.
  5705.                               (This is ignored if DISABLE TEK has been given)
  5706. @end<verbatim>
  5707.  
  5708. @subsection<DEC VT102 Functions While in VT52 Mode>
  5709.  
  5710. @begin<verbatim,leftmargin 1>
  5711. Escape sequence               Description of action
  5712.  
  5713. ESC A                         Cursor up
  5714. ESC B                         Cursor down
  5715. ESC C                         Cursor right
  5716. ESC D                         Cursor left
  5717. ESC F                         Enter graphics mode
  5718. ESC G                         Exit graphics mode
  5719. ESC H                         Cursor home
  5720. ESC I                         Reverse line feed
  5721. ESC J                         Erase to end of screen
  5722. ESC K                         Erase to end of line
  5723. ESC V                         Print cursor line
  5724. ESC X                         Exit Printer Controller mode, transparent print
  5725. ESC Y row column              Direct cursor address, offset from space
  5726. ESC W                         Enter Printer Controller mode,transparent print
  5727. ESC Z                         Identify (response is ESC / Z)
  5728. ESC ^ (caret)                 Enter autoprint mode (printer echoes screen)
  5729. ESC _ (underscore)            Exit autoprint mode
  5730. ESC ]                         Print Screen
  5731. ESC =                         Enter alternate keypad mode
  5732. ESC >                         Exit alternate keypad mode
  5733. ESC <                         Enter ANSI mode (changes to VT102)
  5734. @end<verbatim>
  5735.  
  5736. @subsection<Heath-19 Functions While in Non-ANSI Mode>
  5737.  
  5738. @begin<verbatim,leftmargin 1>
  5739. Escape seq     Mnemonic       Description of action
  5740.  
  5741. ESC A          HCUU           Cursor Up
  5742. ESC B          HCUD           Cursor Down
  5743. ESC C          HCUF           Cursor Forward, stays on same line
  5744. ESC D          HCUB           Cursor Backward, stays on same line
  5745. ESC E          HCD            Clear display
  5746. ESC F          HEGM           Enter Graphics mode
  5747. ESC G          HXGM           Exit Graphic mode
  5748. ESC H          HCUH           Cursor Home
  5749. ESC I          HRI            Reverse Index
  5750. ESC J          HEOP           Erase to end of page
  5751. ESC K          HEOL           Erase to end of line
  5752. ESC L          HIL            Insert line
  5753. ESC M          HDL            Delete line
  5754. ESC N          HDCH           Delete character
  5755. ESC O          HERM           Exit Insert Char mode
  5756. ESC Y row col  HDCA           Direct cursor addressing, offset from space
  5757. ESC Z          HID            Identify (response is ESC / K  which is a VT52)
  5758. ESC b          HBD            Erase Beginning of display
  5759. ESC j          HSCP           Save cursor position
  5760. ESC k          HRCP           Set cursor to saved position
  5761. ESC l          HEL            Erase entire line
  5762. ESC n          HCPR           Cursor Position Report request
  5763. ESC o          HEBL           Erase beginning of line
  5764. ESC p          HERV           Enter Reverse Video mode
  5765. ESC q          HXRV           Exit Reverse Video mode
  5766. ESC r Bn       HMBR           *Modify baud rate - not supported
  5767. ESC t          HEKS           *Enter Keypad shifted mode, not supported
  5768. ESC u          HXKS           *Exit Keypad shifted mode, not supported
  5769. ESC v          HEWA           Wrap around at end of line
  5770. ESC w          HXWA           Discard at end of line
  5771. ESC x Ps       HSM            Set Mode. See table below
  5772. ESC y Ps       HRM            Reset Mode. See table below
  5773.  
  5774.         Ps     Mnemonic       Mode            Set (x)        Reset (y)
  5775.         1      HSM/HRM        25th line       enabled       +disabled
  5776.         2                    *keyclick        off            on
  5777.         3                    *holdscreen      enabled        disabled
  5778.         4                     cursor type     block          underline
  5779.         5                     cursor on/off   on             off
  5780.         6                    *keypad-shifted  shifted        unshifted
  5781.         7                     alt app keypad  enabled        disabled
  5782.         8                    *linefeed        lf=>cr/lf      lf=>lf
  5783.         9                     newline mode    cr=>cr/lf      cr=>cr
  5784.                              + disabling the 25th line also clears it
  5785.  
  5786. ESC z          HRAM           Reset to power-up configuration
  5787. ESC =          HAKM           Enter Alternate Keypad mode
  5788. ESC >          HXAM           Exit Alternate Keypad mode
  5789. ESC <          HEAM           Enter ANSI mode (ESC [ stuff)
  5790. ESC @@          HEIM           Enter Insert Char mode
  5791. ESC [          HEHS          *Enter Hold Screen mode, not supported
  5792. ESC \          HXHS          *Exit Hold Screen mode, not supported
  5793. ESC { and }    HEK, HDK      *Keyboard enable/disable, not supported
  5794. ESC ]          HX25          *Transmit 25th line, not supported
  5795. ESC #          HXMP          *Transmit page, not supported
  5796. @end<verbatim>
  5797.  
  5798. @subsection<Heath-19 Functions While in ANSI Mode>
  5799.  
  5800. @begin<verbatim,leftmargin 1>
  5801. Escape Seq     Mnenonic       Description of Action
  5802.  
  5803. ESC [ s        PSCP           Save cursor position & attributes
  5804. ESC [ u        PRCP           Restore cursor position & attributes
  5805. ESC [ z        PRAM           Reset to power-up configuration
  5806. ESC [ 2 J      ED             Erase entire screen but do not move cursor;
  5807.                               regular Heath-19 moves cursor to Home.
  5808. ESC [ ? 2 h    PEHM           Revert to normal Heath-19 non-ANSI mode
  5809. ESC [ > Ps h   SM             Same as ESC x Ps
  5810. ESC [ > Ps l   RM             Same as ESC y Ps
  5811. @end<verbatim>
  5812. Plus most of the ANSI escape sequences listed for the VT102.
  5813.  
  5814. @subsection<Tektronix 4010/4014 Graphics Terminal Functions>
  5815. @label<-tekem>
  5816. @index<Graphics>@index<Tektronix>
  5817.  
  5818. MS-Kermit's Tektronix 4010 emulator responds to ordinary text, several special
  5819. control codes (for drawing lines and dots), and several escape sequences, as
  5820. shown in Table @ref(-mstekrc).  The commands SET DEBUG and SET TRANSLATION
  5821. INPUT are effective in Tek mode.
  5822.  
  5823. @begin<table>
  5824. @bar()
  5825. @blankspace(1)
  5826. @begin<format>
  5827. @tabclear()
  5828. @case[device,file="@tabset(1.6inch,3.0inch,3.75inch)",
  5829.         else="@tabset(1.5inch,3.0inch,3.75inch)"
  5830. ]
  5831. @ux<Control Code>@\@\@ux<Action>
  5832. @q<FS, > Control-@q<\>@\Backslash@\draw dots
  5833. @q<GS, > Control-@q<]>@\Right square bracket@\draw lines
  5834. @q<RS, > Control-@q<^>@\Caret@\Draw dots incrementally
  5835. @q<US, > Control-@q<_>@\Underscore@\Display text
  5836. @q<BEL,> Control-@q<G>@\@\Beep, make a noise
  5837. @q<BS, > Control-@q<H>@\@\Backspace, non-destructive
  5838. @q<HT, > Control-@q<I>@\@\Tab, convert to single space
  5839. @q<LF, > Control-@q<J>@\@\Line feed, go down one line
  5840. @q<VT, > Control-@q<K>@\@\Move up one text line
  5841. @q<FF, > Control-@q<L>@\@\Clears the screen
  5842. @q<CR, > Control-@q<M>@\@\Carriage return, start of line
  5843. @q<CAN,> Control-@q<X>@\@\Exit Tek sub-mode, or ignore
  5844. DEL, RUBOUT@\@\Delete code, same as BS
  5845.  
  5846. @ux<Escape Sequence>@\@\@ux<Action>
  5847. @q<ESC >Control-@q<E>@\@\Send a status report, turn on Bypass mode
  5848. @q<ESC >Control-@q<L>@\@\Clear the screen (enter sub-mode from VT102)
  5849. @q<ESC >Control-@q<X>@\@\Turn on Bypass mode
  5850. @q<ESC >Control-@q<Z>@\@\Activate crosshairs (GIN mode) and Bypass mode
  5851. @q<ESC Z>@\@\Send terminal identification
  5852. @q<ESC `> (accent grave)@\@\Use solid lines in drawing
  5853. @q<ESC a> through @q<ESC e>@\@\Use dashed line patterns:
  5854. @\@\@ a=fine dots, b=short dashes
  5855. @\@\@ c=dash dot,  d=long dash dot
  5856. @\@\@ e=dash dot dot.
  5857. @q<ESC [ Pn ; Pn m>@\@\Set ANSI colors. Same as for VT102.
  5858. @q<ESC [ ? 3 8 l>@\@\Exit Tek mode (become text terminal, VT102 etc)
  5859. @q<ESC [ ? 3 8 h>@\@\Enter Tek mode (from VT102 mode)
  5860. @end<format>
  5861. @caption<Response of MS-Kermit Tektronix Emulator to Received Characters>
  5862. @tag(-mstekrc)
  5863. @bar()
  5864. @end(table)
  5865.  
  5866. In the table, US is the name for the ASCII character Control-Underscore, 31
  5867. decimal.  Text is written starting with the last drawn point being the lower
  5868. left corner of the first 8 by 8 character cell.  The drawing position is
  5869. updated by 8 dots to the right for each character, and lines wrap at column 80
  5870. (column 90 for Hercules boards).  If text extends "below the screen" the sign
  5871. "@q(More >)" is shown at the bottom right corner and the user needs to press a
  5872. key to continue.  Then the screen will be cleared and the new text will start
  5873. at the top of the screen (no scrolling is done in graphics mode).  A real Tek
  5874. 4010 begins new text at column 40 and will overwrite dots from older material.
  5875. The high resolution EGA screen and the Hercules screen will hold 43 lines, the
  5876. CGA and Monochome screens hold 25 lines, and the AT&T screen holds 50 lines.
  5877. Hercules screens are 90 characters wide and others are 80 characters wide.
  5878. Monochrome systems lack graphics so the text is the normal hardware character
  5879. font placed at the nearest normal 80x25 location (similarly, "drawing" on
  5880. Monochrome systems is achieved by using a text plus ("+") sign where a dot
  5881. would appear).  Text mode is interrupted by the drawing commands discussed
  5882. below.
  5883.  
  5884. @subu<Bypass Mode>:
  5885.  
  5886. Certain Tektronix commands turn on or off "Bypass" mode whereby incoming
  5887. text is not displayed on the screen. Removal of echos of the GIN mode,
  5888. discussed below, is the major use of Bypass. Bypass mode is turned on by
  5889. receipt of
  5890.         ESC Control-E, ESC Control-X, and ESC Control-Z
  5891. and it is turned off upon receipt of
  5892.         BEL, LF, CR, US, other escape sequences, and resetting the terminal.
  5893.  
  5894. @subu<Drawing commands GS, FS, RS>:
  5895.  
  5896. 1. Draw a line or move to a point: GS <@i(xy) @i(xy) @value<ellips> @i(xy)>
  5897.  
  5898. GS is the name for ASCII character Control-@q<]> (right square bracket),
  5899. decimal 29.  <@i(xy)> stands for an encoded x,y coordinate as explained below.
  5900. One or more x,y coordinates may follow GS and line segments are drawn from
  5901. point to point.  The first point is reached without drawing so that GS and the
  5902. initial <@i(xy)> is a simple "move-to" command rather than a "draw-to" command.
  5903. Lines may be constructed from six dash patterns described in Table
  5904. @ref(-mstekrc).  <@i(xy)> coordinates are encoded by separating the 10 bit
  5905. value of x and of y into 5 bit components and then adding two high bits to each
  5906. to identify which component is being represented: high-y, low-y, high-x, or
  5907. low-x. They are transmitted in that order, with the low-x byte always sent
  5908. last.  In fact, bytes may be omitted if they do not change from point to point,
  5909. provided that low-x is always sent.  These bytes range from ASCII space (32
  5910. decimal) to ASCII DEL (127 decimal).  Details are given below, and summarized
  5911. in Table @ref(-mstekxy).  This mode completes when a new command or a CR LF
  5912. (carriage return, line feed) arrives; escape sequences are processed
  5913. transparently but other control codes are ignored.  The interrupting character
  5914. is accepted and processed next.
  5915.  
  5916. 2. Draw dots at given locations: FS <@i(xy) @i(xy) @value<ellips> @i(xy)>
  5917.  
  5918. FS is the name for the ASCII character Control-\ (backslash), decimal 28.
  5919. <@i(xy)> is in the same form as above.  A dot is drawn at each x,y point.  This
  5920. mode completes when a new command or a CRLF character arrives; escape sequences
  5921. are processed transparently but other control codes are ignored.  The
  5922. interrupting character is accepted and processed next.
  5923.  
  5924. 3. Draw dots from the current location: RS @i(<pen> <direction> <direction>
  5925. @value<ellips> <direction>)
  5926.  
  5927. RS is the name for the ASCII character Control-@q(^) (caret), decimal 30.
  5928. @i<pen> is the character Space (32 decimal) to move without drawing or P (80
  5929. decimal) to draw while moving.  @i(<direction>) is one of the letters A, E, D,
  5930. F, B, J, H, I as shown in Table @ref<-mstekdd>.
  5931.  
  5932. @begin<table>
  5933. @bar()
  5934. @blankspace(1)
  5935. @begin<format>
  5936. @tabclear()@tabset(0.5inch,1.25inch,3.50inch)
  5937. @ux(@ux[@i<direction>])@\@ux[@i<Move One Tek Dot This Way>]
  5938. @\A@\East (right)
  5939. @\E@\East and North@\@q< F   D   E>
  5940. @\D@\North (up)
  5941. @\F@\North and West@\@q< B   *   A>     (@q<*> is current location)
  5942. @\B@\West
  5943. @\J@\South and West@\@q< J   H   I>
  5944. @\H@\South
  5945. @\I@\South and East
  5946. @end<format>
  5947. @caption<Tektronix Dot-Drawing Commands>
  5948. @tag(-mstekdd)
  5949. @bar()
  5950. @end(table)
  5951.  
  5952. Example: @q<RS P J J J> (no spaces here, naturally) means draw three dots in
  5953. the southwest direction, stepping to each in turn.  This mode completes when a
  5954. new command or a non-@i(<pen>) or non-@i(<direction>) character arrives; the
  5955. interrupting character is accepted and processed next.
  5956.  
  5957. @subu[Graphics INput (GIN) mode]:
  5958.  
  5959. Graphics input mode is entered when ESC Control-Z is received.  A crosshair is
  5960. drawn on the screen and may be moved by the numeric keypad arrows (fine scale
  5961. motion) or the Shift key and these arrows (coarse scale motion).  Pressing an
  5962. ASCII-producing key sends the position of the crosshairs to the host as the
  5963. sequence of: pressed key, X coordinate, Y coordinate, carriage return, then
  5964. removes the crosshairs, and then returns to text mode.  The coordinates are
  5965. encoded by splitting them into five bit fields, adding an ascii space (20H)
  5966. to each, and are sent as high-y, low-y, high-x and low-x bytes. Bypass mode
  5967. is active while the report is sent to supress echos of the report.
  5968. One may prematurely exit GIN mode by typing Control-C or Control-Break.
  5969. Shift-PrtSc (DOS screen dump) remains active, however.
  5970.  
  5971. @subu(Status or Position Report):
  5972.  
  5973. ESCAPE Control-E requests a status report from the emulator.  Tek terminals
  5974. have many sub-fields.  Kermit-MS sends a byte of 24 hex for being in text mode
  5975. or 20 hex otherwise, followed by the encoded X then Y coordinates and a
  5976. carriage return.  Coordinates are encoded 5 bits at a time similar to the GIN
  5977. report.
  5978.  
  5979. @subu(Identification Report):
  5980.  
  5981. ESCAPE Z requests terminal identification, as for VT52 and VT102.  Currently
  5982. this report is the 10 character sequence @w(@q<IBM_TEK ESCAPE / Z>) (no
  5983. spaces).
  5984.  
  5985. @subu(Screen Capturing):
  5986.  
  5987. @index<Graphics Screen Capture>
  5988. Kermit does not implement a graphics screen capture facility.  There are many
  5989. such Terminate-and-Stay-Resident (TSR) programs in circulation, as either
  5990. public domain offerings or parts of commercial packages (Paint programs and
  5991. even @q<GRAPHICS.COM> from DOS).  High resolution EGA screens require more than
  5992. the @q<GRAPHICS.COM> program.  MS Windows tells the program (Kermit-MS) the
  5993. system is using a pure text-only monochrome adapter so dots are shown as plus
  5994. signs.
  5995.  
  5996. Although Kermit cannot save graphics screens directly (e.g. via the @q(^]F)
  5997. connect-mode command), the received Tektronix escape sequences can still be
  5998. logged to a PC file using the LOG SESSION command.  The resulting log cannot be
  5999. "played back" directly on the PC, but it can be transferred to the host and run
  6000. through Kermit's Tek emulator again, just like a character-mode Kermit session
  6001. log.
  6002.  
  6003. @subu(VGA Modes):
  6004.  
  6005. Considerable effort went into ensuring the graphics display would work
  6006. automatically and not damage monitors.  Thus, Kermit-MS safely tests the active
  6007. display adapter for its kind and capabilities before starting graphics mode.
  6008. Recent VGA and EGA+ display boards are capable of the 640 by 480 scan-line
  6009. 16-color "VGA" mode which is now available on IBM PS/2 computers.  The Tek
  6010. emulator will happily run with 480 scan lines, but: the normal 256KB of video
  6011. memory is sufficient to save only the top 407 lines of the graphics image.  So
  6012. activating this higher resolution mode is accomplished by the command SET
  6013. TERMINAL GRAPHICS VGA and is not done automatically (the VGA is used in EGA
  6014. mode).  The 320 by 200 line by 256 color MCGA mode has too coarse a resolution
  6015. for graphics line drawing and is not supported by Kermit.
  6016.  
  6017. @subu(Coordinate Encoding):
  6018.  
  6019. Coordinate 0,0 is the lower left corner and the X axis is horizontal. Tektronix
  6020. positions are mapped into the typically 640 dots wide by 200 or 350 dots high
  6021. PC screen and thus adjacent Tek positions may yield the same PC screen dot.
  6022.  
  6023. 4010-like devices use positions from 0 to 1023 for both X and Y, although only
  6024. 0 to 779 are visible for Y due to screen geometry.  The Tek screen is 10.24 by
  6025. 7.80 inches and coordinates are sent as 1-4 characters.
  6026.  
  6027. 4014-like devices use positions 0 to 4095, but each movement is a multiple of 4
  6028. positions unless the high-resolution LSBXY are sent.  This makes it compatible
  6029. with the 4010 in that a full sized plot fills the screen.  The emulator accepts
  6030. the LSBXY components but does not use them.
  6031.  
  6032. The various modes are summarized in Table @ref<-mstekxy>, in which the
  6033. following notation is used:
  6034. @begin(display)
  6035. HIX, HIY = High order 5 bits of a 10 or 12 bit position.
  6036. LOX, LOY = Middle order 5 bits of position (low order of Tek 4010).
  6037. LSBXY = Low order 2 bits of X + low order 2 bits of Y (4014 mode),
  6038.    recognized by the Tek emulator but not used to calculate position.
  6039. @end(display)
  6040.  
  6041. @begin<table>
  6042. @bar()
  6043. @blankspace(1)
  6044. @begin<format>
  6045. @tabclear()
  6046. @tabset(0.75inch,1.5inch,2.25inch,3.0inch,3.6inch,4.1inch,4.7inch,
  6047.         5.3inch,5.95inch)
  6048. @ux<Hi Y>@\@ux<Lo Y>@\@ux<Hi X>@\@ux<LSBXY>@\@ux<Characters Sent @~
  6049. (Lo-X Always Sent)>
  6050. Same@\Same@\Same@\Same@\@\@\@\@\Lo-X
  6051. Same@\Same@\Same@\Diff@\@\LSB,@\Lo-Y,@\@\Lo-X@\4014
  6052. Same@\Same@\Diff@\Same@\@\@\Lo-Y,@\Hi-X,@\Lo-X
  6053. Same@\Same@\Diff@\Diff@\@\LSB,@\Lo-Y,@\Hi-X,@\Lo-X@\4014
  6054. Same@\Diff@\Same@\Same@\@\@\Lo-Y,@\@\Lo-X
  6055. Same@\Diff@\Same@\Diff@\@\LSB,@\Lo-Y,@\@\Lo-X@\4014
  6056. Same@\Diff@\Diff@\Same@\@\@\Lo-Y,@\Hi-X,@\Lo-X
  6057. Same@\Diff@\Diff@\Diff@\@\LSB,@\Lo-Y,@\Hi-X,@\Lo-X@\4014
  6058. Diff@\Same@\Same@\Same@\Hi-Y,@\@\@\@\Lo-X
  6059. Diff@\Same@\Same@\Diff@\Hi-Y,@\LSB,@\Lo-Y,@\@\Lo-X@\4014
  6060. Diff@\Same@\Diff@\Same@\Hi-Y,@\@\Lo-Y,@\Hi-X,@\Lo-X
  6061. Diff@\Same@\Diff@\Diff@\Hi-Y,@\LSB,@\Lo-Y,@\Hi-X,@\Lo-X@\4014
  6062. Diff@\Diff@\Same@\Same@\Hi-Y,@\@\Lo-Y,@\@\Lo-X
  6063. Diff@\Diff@\Same@\Diff@\Hi-Y,@\LSB,@\Lo-Y,@\@\Lo-X@\4014
  6064. Diff@\Diff@\Diff@\Same@\Hi-y,@\@\Lo-Y,@\Hi-X,@\Lo-X
  6065. Diff@\Diff@\Diff@\Diff@\Hi-y,@\LSB,@\Lo-Y,@\Hi-X,@\Lo-X@\4014
  6066. @end<format>
  6067. @begin<format>
  6068. @tabclear()
  6069. @tabset(3.0inch,3.6inch,4.1inch,4.7inch,5.3inch,5.95inch)
  6070. Kind code for byte:@\20h@\60h@\60h@\20h@\40h
  6071. @\(transmitted left to right)
  6072. @end<format>
  6073. @caption<MS-Kermit Tektronix Coordinate Interpretation>
  6074. @tag(-mstekxy)
  6075. @bar()
  6076. @end(table)
  6077.  
  6078. Note that LO-Y must be sent if HI-X has changed so that the Tektronix knows the
  6079. HI-X byte (in the range of 20h-3Fh) is HI-X and not HI-Y.  LO-Y must also be
  6080. sent if LSBXY has changed, so that the 4010 will ignore LSBXY and accept LO-Y.
  6081. The LSBXY byte is
  6082. @MD<60h + (MARGIN * 10h) + (LSBY * 4) + LSBX>
  6083. MARGIN is 0 here and refers to splitting the screen left and right for text
  6084. rollover, which the Kermit Tek emulator does not do.
  6085.  
  6086. @subu<Tek 4010 Example>:
  6087.  
  6088. Suppose <@i(xy)> is point y = 300, x = 500 in Tektronix coordinates.  Split
  6089. each 10-bit coordinate into 5-bit groups, add add the Kind code to each. Send
  6090. the X part last.
  6091. @begin<example>
  6092.                 HI-Y     LO-Y                   HI-X     LO-X
  6093. Y=300d=012Ch=  01001    01100   X=500d=01F4h=  01111    10100
  6094.   +Kind code +@u<100000> +@u<1100000>     +kind code +@u<100000> +@u<1000000>
  6095. Binary        101001 01101100                 101111  1000100
  6096. ASCII            )       l                       /       D
  6097. @end<example>
  6098. So <@i(xy)> = (500,300) is sent or received in a GS command as @qq<)l/D>.  An
  6099. example in C (program fragments):
  6100. @begin<example,leftmargin 0,group,blanklines hinge>
  6101. #define ESC  27
  6102. #define GS   29
  6103. #define US   31
  6104. FILE *fp;                      /* File descriptor for terminal */
  6105.  . . .
  6106.  
  6107.     fputc( GS, fp); coord( 75, 65);       /* Move to 75,65      */
  6108.     fputc( ESC, fp); fputs("[31m", fp);   /* Set foreground to red */
  6109.     fputc( US, fp); fputs("A House", fp); /* Annotate at 75,65  */
  6110.     fputc( ESC, fp); fputs("[33m", fp);   /* Set foreground to yellow */
  6111.     fputc( GS, fp);                       /* Now draw lines...  */
  6112.     coord( 50, 50); coord(300, 50);       /* Bottom side        */
  6113.     coord(300,200); coord( 50,200);       /* Right wall, top    */
  6114.     coord(175,250); coord(300,200);       /* Roof               */
  6115.     fputc( GS, fp);                       /* Start a new line   */
  6116.     coord( 50, 50); coord( 50,200);       /* Left wall at 50,50 */
  6117.     fputc( ESC, fp); fputs("[37m", fp);   /* Set foreground to white */
  6118.     . . .
  6119.  
  6120. coord(x, y) int x, y; {        /* Send x,y coordinates to Tek 4010 */
  6121.     fputc((y / 32) + 32, fp);             /* High y */
  6122.     fputc((y % 32) + 96, fp);             /* Low  y */
  6123.     fputc((x / 32) + 32, fp);             /* High x */
  6124.     fputc((x % 32) + 64, fp);             /* Low  x */
  6125. }
  6126. @end<example>
  6127.  
  6128. @section<IBM PC Kermit Technical Summaries>
  6129.  
  6130. Under normal circumstances, MS-Kermit takes advantage of the computer's
  6131. hardware, and often bypasses DOS (sometimes even BIOS) to achieve high
  6132. performance, to exercise special machine features, or to produce an attractive
  6133. screen display.  Thus, it is not in all respects a "well behaved" DOS program.
  6134.  
  6135. @index<BIOS>
  6136. MS-Kermit redirects interrupts 0BH (COM2/4) or 0CH (COM1/3), 14H (serial port),
  6137. 23H (Control-Break), 24H (DOS Critical Error) and returns them when done. It
  6138. uses the BIOS for keyboard, video display, and system information interrupts.
  6139. It examines segment 40H for EGA operating modes and it does direct screen
  6140. reads and writes.  Memory for the screen roll backbuffer is negotiated with
  6141. DOS to leave room for a second copy of
  6142. @q<COMMAND.COM> to run tasks within Kermit; about 100KB to 148KB is needed for
  6143. the entire program.  Video page zero is normally used, but page one is employed
  6144. to save screens with non-standard dimensions.  Hercules and other graphics
  6145. mode displays are supported only in Tektronix terminal mode.  Kermit's timing
  6146. delays are dynamically adjusted each time the serial port is started to
  6147. accomodate machines of different speeds; duration of the normal software timing
  6148. loop is measured with the hardware timer chip and looping is adjusted to
  6149. produce uniform delays on 8088 through 80386 machines.
  6150.  
  6151. @subsection<Kermit-MS/IBM on Local Area Networks>
  6152. @label<-msnetw>
  6153.  
  6154. The IBM version of Kermit-MS has support for the IBM Local Area Network NetBIOS
  6155. (and emulators) interface, Interrupt 5CH, with additional support for selected
  6156. vendor specific features (presently just AT&T STARLAN), activated by the SET
  6157. PORT NET command, described above, direct support for the Ungermann Bass Net
  6158. One proprietary Interrupt 14h interface, and via SET PORT BIOSn support for
  6159. many other networks which intercept the Bios serial port interrupt 14h.
  6160. Communications across a LAN occurring through the NetBIOS interface use virtual
  6161. circuits (Sessions), named nodes, and conventional NetBIOS packets.  Kermit-MS
  6162. does not use LAN terminal interface packages nor the Redirector or similar
  6163. functions.
  6164.  
  6165. Kermit LAN operations are harmonious with normal network activity and many
  6166. pairs of Kermits can communicate simultaneously.  Kermit does not use
  6167. LAN File Server functions, since these are proprietary and vendor-specific.
  6168. Kermit can, however, send and receive files to/from a LAN file server.
  6169.  
  6170. @index<Token Ring>@index<Starlan>@index<Novell>@index<NetBIOS>
  6171.  Since Kermit uses the standard NetBIOS interrupt 5CH interface, it will run on
  6172. most LANS including IBM PC Net, IBM Token Ring, AT&T STARLAN, and many others,
  6173. and will run with Novell NetWare software.  Presently, Kermit knows some
  6174. details of STARLAN and is able to send a BREAK across the net and can use ISN
  6175. node names with long path parts.  If STARLAN is not operating these features
  6176. are not available.  As more detailed information becomes available special
  6177. features of other networks can be built-in.
  6178.  
  6179. The sequence of operations is similar for a client or server Kermit.  The SET
  6180. PORT NET command is issued by both. This command causes Kermit to validate the
  6181. presence of the Interrupt 5CH interface, test for vendor additions, test for a
  6182. session already underway, establish and display a unique Kermit node name, but
  6183. not make a network session.  The node name of the remote server machine follows
  6184. the word NET; this is not to be confused with our own node name discussed
  6185. below.
  6186.  
  6187. If an earlier LAN session is still active then the current remote node name
  6188. field of the command is examined for presence of a name. If a name is given
  6189. then Kermit asks the user whether to RESUME the session or start a NEW one.
  6190. Starting a new one results in Kermit hanging up the old session (HANGUP)
  6191. before
  6192. proceeding; resuming an old one requires no further work at this point.
  6193.  
  6194. When Kermit attaches to the network for the first time it needs to select a
  6195. unique local node name so that two systems can form a Session by using these
  6196. names as addresses. Kermit uses a simple algorithm to make the name. Kermit
  6197. probes the network adapter board/software for the name of the local system.  If
  6198. the name is present Kermit makes its own name by appending a dot K (.K) to the
  6199. local name. If the local name is absent then Kermit first tries a standard name
  6200. of "mskermit.K"; should the network report that the name is not unique (another
  6201. node is using the name) then the user is asked to choose a name. This process
  6202. continues until a unique name is obtained or the user decides to quit.  The
  6203. final Kermit node name is reported on the screen; client Kermits will need to
  6204. know the name of the server Kermit.
  6205.  
  6206. Communication across the LAN begins differently for client and server Kermits.
  6207. The server must be started first, by simply placing a Kermit in server mode.
  6208. This results in a network Listen request being posted so that arriving packets
  6209. with the correct node name can be delivered to the server Kermit. Next, a
  6210. client Kermit tries to connect to the server by issuing a Kermit server
  6211. command to the proper node name (as given in the client's SET PORT NET node
  6212. command); REMOTE WHO is a satisfactory choice. The client machine actually
  6213. issues a network Call to the server's node name to make a connection and then
  6214. follows it with data packets holding the Kermit server request. The initial
  6215. exchange of packets establishes a particular virtual circuit between the two
  6216. nodes. If the connection cannot be started then the client Kermit reports this
  6217. fact to the user. The most common causes of a failure at this point are:
  6218. @begin<enumerate>
  6219. The client Kermit did not specify the correct server Kermit node name
  6220. (spelling errors, wrong case for letters, missing dot K),
  6221.  
  6222. One or both machines are using a network adapter board which is not the
  6223. first in the machine; Kermit uses only the first board,
  6224.  
  6225. The LAN NetBIOS emulator does not fully support IBM standard virtual
  6226. circuits,
  6227.  
  6228. The server machine was not started on the network before the client.
  6229. @end<enumerate>
  6230.  
  6231. A virtual circuit will be broken if a sender or receiver gets no response to a
  6232. request within a short time interval set by the LAN hardware/software.
  6233. However, the LAN procedures within Kermit automatically reestablish the
  6234. circuit transparently to the user when new information is communicated; the
  6235. last used remote node name is remembered internally for this purpose.  This
  6236. also means the server Kermit will respond to a connection from a new client
  6237. Kermit if the first client is idle for say a minute or so. A session can be
  6238. terminated by the user by issuing the HANGUP command or by exiting Kermit. A
  6239. session will not be broken this way if the user on the client Kermit changes
  6240. to a regular serial port.
  6241.  
  6242. Finally, when Kermit returns control to DOS, but not via the PUSH command, its
  6243. unique Kermit node name is removed from the network adapter board.
  6244.  
  6245. During network communications Kermit uses network packets holding 256 bytes
  6246. of data.  If both Kermits are given the command
  6247. @example[SET RECEIVE PACKET 1000]
  6248. then the network and Kermit will be used to best efficiency.  Experience has
  6249. shown that the client Kermit should have its TIMER OFF because the server may
  6250. be asked to do an operation via DOS which does not complete before the client
  6251. side would timeout. An observation of some token passing networks indicates
  6252. that Kermit packets slightly longer than 256, 512, etc bytes result in marked
  6253. slowing down because the remaining small piece is not sent until a net timer
  6254. expires.  Carrier sense (Ethernet, STARLAN) boards seem to be more agressive
  6255. and export small packets immediately.
  6256.  
  6257. @index<Ungermann Bass Net One LAN>
  6258.  Support for the Ungermann-Bass@index<Ungermann-Bass> Net/One network, with its
  6259. NET Command Interface (NETCI), was contributed by Renne Rehmann and Henrik
  6260. Levkowetz.  In addition to the SET PORT NET [nodename] command, which may be
  6261. used to connect to other nodes on the net with the standard NetBIOS calls,
  6262. NETCI provides the means to connect directly to serial ports on the
  6263. Ungermann-Bass network.  Use SET PORT UB-Net1 and enter Connect mode. The NETCI
  6264. prompt, @q(>>), should appear and all the usual NETCI commands (connect, get,
  6265. list, resume, abandon, examine, identify, set, logout, quit) may be selected.
  6266. This line is disconnected when Kermit exits. However, the line may be put on
  6267. hold, exit Kermit, then later restart Kermit and give the SET PORT UB-Net1 and
  6268. CONNECT commands, and Resume the line.
  6269.  
  6270. @index<Bios LAN>
  6271. Some LANs intercept the normal serial port Bios interrupt 14H and masquerade
  6272. as a modem. This service can be engaged within Kermit by the SET PORT BIOSn
  6273. command, where n is 1, 2, 3, or 4, as appropriate for the LAN software. To
  6274. work properly the LAN must support the same use of registers as the system
  6275. Bios. Several X.25 and TCP/IP packages have been operated successfully with
  6276. the SET PORT BIOSn command. Since this channel appears to Kermit as a simple
  6277. software level serial port, Kermit provides neither interrupt driven i/o
  6278. nor LAN session support.
  6279.  
  6280. @index<Network security>@index<Security> Kermit can access files on the LAN
  6281. file server via DOS even while using the LAN as a communications medium.
  6282. Network administrators should note this point because a user operating Kermit
  6283. in Server mode can allow his or her file server directories to be available to
  6284. other network users also running Kermit, without additional security checking
  6285. of the other users.  The network drives visible to the Server Kermit can become
  6286. devices available for Kermit-@|to-@|Kermit file transfers, etc, unless the
  6287. DISABLE command is used to confine access to the current disk and directory. A
  6288. corollary is when files are accessible to DOS commands they can become public.
  6289.  
  6290. @subsection<Use of Kermit-MS with External Device Drivers>
  6291.  
  6292. It is often desirable to supplement or modify the behavior of a DOS program
  6293. by loading it with special external device drivers.  These drivers may operate
  6294. at either the DOS or BIOS level.  When Kermit-MS accesses the BIOS directly,
  6295. DOS-level drivers are ineffective.  When Kermit accesses the hardware directly,
  6296. both the DOS and the BIOS level drivers are bypassed.  Kermit-MS provides
  6297. several mechanisms to allow these external drivers to operate as intended.
  6298.  
  6299. Here are a few examples:
  6300. @begin<itemize>
  6301. IBM's @q<ANSI.SYS> console driver operates at the DOS level.  It allows the
  6302. major IBM PC keys to be redefined, and also interprets selected ANSI-format
  6303. escape sequences for screen control.  It works fine at Kermit-MS command level,
  6304. except SHOW KEY does not recognize strings assigned to keys via @q<ANSI.SYS>,
  6305. and fine at CONNECT level.  To use @q<ANSI.SYS> at CONNECT level, issue
  6306. the Kermit-MS commands SET KEY OFF (to read keys via DOS) and SET TERMINAL NONE
  6307. (to display characters through DOS).
  6308.  
  6309. @index<Blind>@index<Display, File Transfer>@index<Handicapped>
  6310.  Blind people often have speaking or Braille machines attached to their PCs.
  6311. DOS-level device drivers are generally used to redirect screen output to these
  6312. devices, which works OK at DOS or MS-Kermit command level.  SET TERMINAL NONE
  6313. will allow this redirection to take place during CONNECT.  But these devices
  6314. also need to have the computer's output appear as a coherent stream of text, so
  6315. users should also take care to inform the remote host to format its output for
  6316. a "dumb" or hardcopy terminal.  In addition, Kermit-MS' normal file transfer
  6317. display does not mesh well with these devices, but that can be remedied using
  6318. SET DISPLAY SERIAL.
  6319.  
  6320.  People with motor impairments may be using special keyboard replacements
  6321. supported by DOS-level device drivers.  As with @q<ANSI.SYS>, Kermit-MS may be
  6322. directed to use such keyboard drivers with the command SET KEY OFF.
  6323.  
  6324.  Other keyboard drivers are available that work, like Kermit-MS, at BIOS level.
  6325. Examples include ProKey and SuperKey.  These may be used at DOS or Kermit-MS
  6326. command level as well as during CONNECT.
  6327.  
  6328.  Conceivably, drivers exist that allow DOS communication programs to emulate
  6329. terminals other than ANSI.  You should be able to use them, if they exist, in
  6330. conjunction with Kermit-MS by telling Kermit to SET TERMINAL NONE, but the
  6331. speed may not be high because of the intervening DOS calls.
  6332. @end<itemize>
  6333.  
  6334. @subsection<Kermit-MS/IBM Serial Port Information>
  6335. @label<-msports>
  6336.  
  6337. Kermit-MS for IBM PC's and compatibles does testing of serial ports before
  6338. use.  This section describes those tests so users may understand what Kermit
  6339. does.
  6340.  
  6341. When a serial port is selected by the SET PORT COMx command Kermit looks at
  6342. low memory addresses in segment 40H assigned to hold the base address of each
  6343. COMx port; COM1 is in word 40:0H, COM2 is in word 40:2H, and so on. If the
  6344. value in the appropriate word is binary zero then Kermit declares the port to
  6345. be unavailable.  Otherwise, Kermit runs read-only (i.e., safe) tests at the
  6346. base address to validate the presence of an official 8250 UART chip.  If the
  6347. tests fail Kermit indicates it will do i/o through the slow Bios pathway; some
  6348. PC clones need to work this way even though the Bios has speed problems even at
  6349. 1200 baud.  Otherwise, interrupt driven i/o will be done through the 8250 UART
  6350. (that is, very fast).
  6351.  
  6352. There is a special case when a communications board is present, set for COM2,
  6353. but a normal COM1 serial port is not.  Kermit detects this situation.
  6354.  
  6355. @index<COM3 and COM4>
  6356. Many machines now have more than two serial ports, but until recently there has
  6357. been no standard about addresses for COM3 and COM4.  PC DOS 3.30 does not
  6358. assign them either because it is really a problem of the system ROM Bios boot
  6359. code run when the power is turned on.  However, Kermit will use COM3 and/or
  6360. COM4 if the base address of a port is placed in low memory words 40:4H (COM3)
  6361. or 40:6H (COM4); the tests described above are then carried out.  One
  6362. restriction is that the Interrupt ReQuest number (IRQ in the serial port board
  6363. manual) must be either IRQ4 or IRQ3.  Kermit attempts to locate which line is
  6364. correct with a short test.  If the test is not successful it uses the IRQ4 for
  6365. COM3 (and for COM1) and IRQ3 for COM4 (and for COM2) on the PC/AT, and on the
  6366. PS/2 it uses IRQ3 for COM2, COM3, and COM4.  Check the board and its manual.
  6367. DOS utility DEBUG can be used to create a short program to insert the board's
  6368. addresses into the segment 40H memory locations; a sample program is given
  6369. below.
  6370.  
  6371. @begin<table>
  6372. @bar()
  6373. @blankspace(1)
  6374. @begin<format,leftmargin +2,above 1,below 1,group>
  6375. @tabclear()@tabset(1.5inches,2.7inches,4.35inches)
  6376. @ux(Serial Port)@\@ux(Address)@\@ux(IRQ Line)@\@ux(Conventions)
  6377. COM1@\03F8H@\4@\@r<IBM standard>
  6378. COM2@\02F8H@\3@\@r<IBM standard>
  6379. COM3@\?@\4 (3 for PS/2)@\@r<Board>
  6380. COM4@\?@\3@\@r<Board>
  6381. @end(format)
  6382. @caption(IBM PC/XT/AT Serial Port Numbers)
  6383. @tag(-msportnums)
  6384. @bar()
  6385. @end(table)
  6386. The addresses shown as query marks are to be found in the board's reference
  6387. manual; values such as 2E8H and 2E0H would be common.  However, there is no
  6388. standard for anything to do with COM3 and COM4 on non-PS/2's.
  6389.  
  6390. Assuming that you have selected an address in harmony with the rest of the
  6391. system (good luck on that part), set the board's switches or jumpers, and use
  6392. DEBUG to insert the address(es) in segment 40H memory.  The example below
  6393. creates a small program named @q<SETCOM3.COM> to put address 02E8H into the
  6394. memory word 40:04H for COM3 and writes the program to drive A. (Disregard the
  6395. xxxx items below):
  6396. @begin<example>
  6397. A> DEBUG                        @i<don't type these comments>
  6398. -n a:setcom3.com                @i<sets name of output file>
  6399. -a                              @i<assemble command>
  6400. xxxx:100 mov ax,40              @i<value 40h>
  6401. xxxx:103 mov es,ax              @i<put it into register es>
  6402. xxxx:105 mov ah,02              @i<the 02 part of 02E8H>
  6403. xxxx:107 mov al,e8              @i<the E8 part of same>
  6404. xxxx:109 es:
  6405. xxxx:10A mov [4],ax             @i<store in 40:4 for com3 ([6] for com4)>
  6406. xxxx:10D int 20                 @i<return to DOS>
  6407. xxxx:10F                        @i<blank line to end assemble mode>
  6408. -r cx                           @i<show contents of register cx>
  6409. CX 0000
  6410. : 0f                            @i<set register cx to write 0fh bytes>
  6411. -w                              @i<write material to the disk file>
  6412. -q                              @i<quit debug>
  6413. A> DEBUG setcom3.com
  6414. -u                              @i<unassemble to see if all is well>
  6415. -q                              @i<quit debug>
  6416. @end<example>
  6417. Note, for COM4, use @q<[6]> above rather than @q<[4]>, and of course employ
  6418. your board's port address in place of 02E8H (check the manual).  Finally, try
  6419. it:
  6420. @begin<example>
  6421. A> setcom3                      @i<run the program>
  6422. A> DEBUG                        @i<now see what's down there>
  6423. -d 40:00                        @i<display bytes in seg 40H>
  6424.  
  6425.        @i<( Shows many bytes.  See yours?  Good. )>
  6426.  
  6427. -q
  6428. A>
  6429. @end<example>
  6430.  
  6431. A small side effect noted in practice is the first time the extra port is used
  6432. there may be garbage from it.  Just return to the Kermit prompt and try again,
  6433. if necessary SET PORT to the other COM lines momentarily, all should be well
  6434. the second time.
  6435.  
  6436. More technical comments, for those with an interest.  When Kermit finishes with
  6437. a port it disables interrupts for that serial port and returns the IRQ signal
  6438. line to its state found when Kermit started since many devices can share the
  6439. same Interrupt ReQuest line but only one device at a time can be active on it.
  6440. If you find that transmissions are good but there is no reception then
  6441. another device has stolen the IRQ; disable it or find a guru.  Kermit will work
  6442. with non-standard addresses for COM1 and COM2 but the IRQ's must be as in the
  6443. table above.  Accessing a non-existent port produces a message and all
  6444. communications are discarded safely in the bit bucket.
  6445.  
  6446. @subsection<CTTY COMx for IBM Machines>
  6447. @label<-msctty>
  6448.  
  6449. The DOS command CTTY COMx redirects the standard input and output from the
  6450. keyboard and screen, respectively, to the indicated communications channel.
  6451. If a Kermit Server is operated this way, "through the back port", then both
  6452. DOS and Kermit can access the port hardware simultaneously; a deadlock develops
  6453. on IBM machines.  The items below refer to only the IBM version of Kermit-MS.
  6454.  
  6455. Kermit-MS/IBM version successfully resolves the deadlock in the following
  6456. manner.  When Kermit requires the serial port it also attaches itself to
  6457. Interrupt 16H, the Bios RS232 serial port routine.  Code within Kermit receives
  6458. the DOS serial port requests via Interrupt 14H and either passes the request
  6459. to the Bios if the COM line is not that used by Kermit or it handles the
  6460. request internally for conflicting situations.  When the same port is used by
  6461. both DOS and Kermit, Kermit discards DOS output material (typically a prompt,
  6462. but could be the dreaded Abort, Retry, Ignore message) and returns a success
  6463. code to DOS, it returns an ascii Backspace code to DOS read requests (this is
  6464. a key item to keep DOS complacent while Kermit communicates), and it returns
  6465. reasonable status for modem status.  The interception ceases when Kermit
  6466. releases the port, such as when the Kermit prompt is displayed, and this lets
  6467. DOS converse out the serial port.
  6468.  
  6469. It is worth restating that a large number of programs bypass DOS to achieve
  6470. higher performance.  When such programs are started through the back door they
  6471. may still require input from the real keyboard and will hang, waiting for it.
  6472. There is nothing to do about this situation except a) don't let it happen, b)
  6473. contact the local operator to push some keys.
  6474.  
  6475. @subsection<Screen Sizes and the EGA Board, IBM Versions>
  6476.  
  6477. Support has been included for Enhanced Graphics Adapter (EGA) video display
  6478. boards which can be configured for other than the standard 80 columns by 25
  6479. lines, say 132 columns or 43 lines or other.  Several boards, the Tseng Labs
  6480. EVA (also Orchid Designer) board with the 132 column kit installed, the ATI
  6481. EGA Wonder, the Video 7 Deluxe and VGA, and the Everex EV-659 (ega) and EV-673
  6482. (vga), can be controlled directly by Kermit for 80/132 column changes.  Other
  6483. boards need to be placed in the desired display mode by the user.  Kermit then
  6484. adapts to the settings if the board obeys standard rules for using the Bios EGA
  6485. memory areas in segment 40H.  The Video-7 boards have been used successfully
  6486. in all screen sizes, including 132 columns by 43 lines, with an NEC Multisync
  6487. monitor.
  6488.  
  6489. The IBM EGA board has several noteworthy bugs which are now standards.  One is
  6490. the cursor dots are not always on the correct scan lines when the number of
  6491. screen lines is other than 25.  Kermit-MS attempts to compensate for this
  6492. attribute.  Screen roll back space is fixed in size so there are fewer pages
  6493. for more dense screens; standard screens use an internal buffer, non-standard
  6494. screens use a buffer plus video page 1. @q<ANSI.SYS>@index<ANSI.SYS> is hard
  6495. coded for 25 line displays so all DOS i/o will eventually overwrite itself on
  6496. line 25; the emulator does not use DOS i/o.  Commercial replacements for
  6497. @q<ANSI.SYS> should be able to use all screen lines.
  6498.  
  6499. Screen dumps work correctly if done with Kermit commands.  DOS PrintScreen
  6500. may or may not, depending on your EGA board. Graphics dumps are not managed
  6501. by Kermit.
  6502.  
  6503. @index<132 Column Mode>@index<ATI EGA Wonder>@index<Everex EV-659>
  6504. @index<Tseng Labs Multipak>@index<Video 7 Vega>@index<EGA Boards>
  6505. When the VT102 receives escape sequences to change between 80 and 132 column
  6506. modes the screen is reset and the ATI EGA Wonder, or Everex EV-659 (EGA) or
  6507. EV-673 (vga), Tseng Labs Multipak (and Orchid Designer), or Video 7 Vega or
  6508. VGA board is asked to change modes (but only if that board is present); other
  6509. display adapters are left in their current state.  Users of Tseng boards must
  6510. run the Tseng BIGSCR /R:25 program before starting Kermit.  The right margin
  6511. is enforced strongly so a board in 132 column mode will not display material
  6512. to the right of column 80 if the emulator is in 80 column mode.  Similarly,
  6513. material to the right of column 80 is not preserved in the emulator if the
  6514. display adapter is operating in 80 column mode; real VT102s keep that
  6515. invisible material in hardware memory whereas the emulator does not.
  6516.  
  6517. Reference is made to line 25 in the emulator; this is normally the
  6518. status/mode line in Kermit.  Real VT102's have only 24 line displays.  If
  6519. the display adapter is set for a different number of lines per screen then
  6520. the 25th line is interpreted to mean the bottom display adapter line, such
  6521. as line 43.  Should the host access the status/mode line then the line is
  6522. declared to be disabled (same as SET MODE OFF) so that Kermit's own status
  6523. information does not overwrite the host's when the screen is restored.
  6524. Toggling a disabled mode line has no effect; only SET MODE ON will enable it
  6525. again.  The Heath-19 terminal has the unusual feature that disabling the mode
  6526. line @q<(ESC y 1)> also clears it.
  6527.  
  6528. @subsection<Kermit-MS/IBM Printer Control>
  6529. @label<-msprint>
  6530.  
  6531. @index<ANSI Printer Control>
  6532. The IBM PC MS-Kermit VT102 terminal emulator also supports full transparent
  6533. printing of 8-bit binary bytes.  The escape sequence @w(@qq<ESC [ 5 i>) turns
  6534. on transparent printing, in which all further 8-bit characters are sent
  6535. directly to the printer, bypassing the SET TRANSLATION INPUT
  6536. filter, and are not shown on the screen.  Escape sequence @w(@qq<ESC [ 4 i>)
  6537. turns off transparent printing and the escape sequence is not sent to the
  6538. printer.  Non-transparent printing is controlled by the @w(@qq<ESC [ ? 5 i>)
  6539. and
  6540.  @w(@qq<ESC [ ? 4 i>)
  6541.  sequences.  Such printing simply duplicates text intended for the screen,
  6542. excluding escape sequences.  The text also appears on the screen.
  6543.  
  6544. @index<Printer>
  6545. Kermit-MS accesses the system printer through DOS calls several ways; neither
  6546. the Bios nor the hardware are used.  Files directed to the printer by the SET
  6547. DESTINATION PRINTER command are written by opening a file with the name PRN
  6548. (DOS's name for the system printer) and writing to it the same as to a disk
  6549. file; DOS provides limited buffering.  LOGging to device PRN works the same
  6550. way, as can be noticed by the last line or so not being printed until the log
  6551. file is CLOSED.  DOS is used again while emulating a terminal in CONNECT mode.
  6552. If the VT102 emulator found in the IBM PC is used for transparent or Controller
  6553. printing, single characters are written to DOS file handle 4, the DOS standard
  6554. print device.  If the screen is echoed to the printer via the typical Control
  6555. PrtSc key combination, or equivalent, single characters are written by the DOS
  6556. function 05H Printer Output call.  In both cases of terminal emulation the
  6557. printer's ready status is found by the DOS IOCTL 44H call.  Only the Control
  6558. PrtSc case results in the PRN message being displayed on the status line.
  6559. Finally, the classical IBM PC Shift PrtSc command to copy the whole screen to
  6560. the printer is unknown to Kermit because the system Bios traps the key
  6561. combination and does not tell Kermit about it.  If the Control P command is
  6562. given to DOS before Kermit starts then again characters are echoed by the
  6563. system Bios without Kermit's knowledge; this situation can result in lost
  6564. characters.
  6565.  
  6566.      Print spoolers generally operate by being told an existing filename and
  6567. then in the background they steal cpu cycles to read from disk and write to
  6568. the printer.  The DOS PRINT command invokes such a spooler.  Although an active
  6569. Kermit does not feed these software programs directly the spooler and Kermit
  6570. can compete for cpu cycles and characters can be lost.  If a non-DOS resident
  6571. program intercepts characters destined for the printer device and spools them
  6572. Kermit does not know about it and similar competion can occur.
  6573.  
  6574. @index<Flow Control>
  6575.      During file transfers printing is carefully sequenced to occur only when
  6576. the local Kermit is in control of the communications line so that a small pause
  6577. will not result in missing characters arriving at the serial port.  When
  6578. terminal emulation is active then printing competes for cpu time with the
  6579. serial port routines.  Generally, the serial port wins such contests if the
  6580. port is interrupt driven (Generic Kermit is not interrupt driven, so beware).
  6581. However, the printing itself can use enough cpu cycles to delay processing of
  6582. characters to the screen and eventually the receive buffer of the serial port
  6583. fills to the high water mark and an XOFF flow control character is sent to the
  6584. host to suspend further transmissions until we send an XON.  If FLOW is NONE
  6585. then expect lost characters at the serial port.  Experience with ordinary IBM
  6586. PC's through 80386 machines at very high baud rates indicates no characters are
  6587. lost when FLOW is XON/XOFF.  However, it is possible on some machines for the
  6588. printer to have priority over the serial port, and hence to have lost
  6589. characters, especially if a Terminate Stay Resident program intercepts
  6590. characters destined for the printer and keeps interrupts turned off too long.
  6591.